Something i take for granted in PHP is the use of Modular Arithmetic when display results in a grid like format. Usually in php, i would do something like this to display three items per row if ($count % 3 == 0) { // Add Break / Clear here } So i assumed something like [...]
Feb 27 2008
Var Vars
Var vars can be very handy, you can use them to associate a name to a variable. <? $my_soon_to_be_variable = 'wow_my_variable'; $$my_soon_to_be_variable = 'Now it's a VAR VAR'; // It's a var var echo $wow_my_variable; // That's right, it's a variable ?>
Feb 27 2008
Make all letters caps
A nice little way of making all letters into capitals is to use PHP's inbuilt function strtoupper, like so. echo strtoupper('Hi, i am going to be all in caps in just one mo'); Will print ... HI, I AM GOING TO BE ALL IN CAPS IN JUST ONE MO