PHP's <<< returns a value

A not well documented feature of heredocs or <<< in PHP is that it returns the string, making it possible to use with variables as well as with echo or print statements/constructs/functions:

SVN Log Entries

I'm start work with a new company in October, and one of my duties will be to start up some kind of source repository. Yup, it's scary, there's still companies out there with no kind of source control. Anyway, I started thinking about how the log entries made when committing to the source repo can be helpful.

Firefox requests a page twice?

I'm busy creating a site for a client who wants to know when certain internal links get clicked. Not a problem, I just insert a record into a table every time the links they want to know about get accesesd. Only problem is, when I check the table, I notice that every page impression gets logged twice.

ob_start et al or fopen('php://output', 'r+')

I was coding some extra functionality into some of my classes, and started writing code which exports a MySQL table to various formats, amongst others, CSV.

Now, PHP has to lovely functions, fgetcsv and fputcsv. The only problem is they only output to a file, nothing else. So, if you want the CSV data as a string, it complicates things.

Automated / Spider submissions to drupal

I have a lot of info I'd like to post to one of my drupal website (www.whatsupinmelville.co.za), but, like any geek, I'm too lazy to do it manually. So instead of doing it manually (which will probably take me 2 or 3 hours), I'll code something to do it in a few minutes.

The fact that it will take me more than 2 or 3 hours, as I'm learning python in the process, doesn't detract from the experience :).

mootools Fx.Slide extended

I changed the mootools library somewhat to add the option too Fx.Slide to close too a specified width/height.

The only thing I'd still like to change, is to have the handle at the top of the containing element. Any ideas?

An example is provided here...

HTML Input Tag Functions

Ok, in my previous post I started explaining what YaPHPfter is, and how it is all about recognizing patterns and reducing work for you, the coder. I also talked about how HTML input tags containt patterns, and how we can explout these patterns.

I went ahead and coded a HTML library which exploits these patterns, which can eventually be used in dynamically generating HTML forms from predefined meta-data.

YaPHPfter2

I while back I started work on a PHP framework, pretty much the same as Ruby on Rails' Active Record, but on PHP and coded by yourself truly. I named it YaPHPfter: Yet Another PHP Framework.

Afrikaanse Drupal

Die deel van die website hardloop op Drupal (http://drupal.org/), 'n funky content engine wat nogal extendible is. Hy vertaal maklik, so ek't begin om stuk stuk die interface (!) na Afrikaans toe oor te skakel. As jy nog vertalings of enige veranderinge/voorstelle het, laat weet my!

Syndicate content