Programming Nuances, PHP and JavaScript

Two little snippets, some simple things that seem to be forgotten when writing code.  First, a general example using PHP; have you ever found yourself writing a loop that looks something like this? $i = 0; while ($row = mysql_fetch_assoc($result) { // … // maybe something about $i % 2 to determine even-from-odd rows ++$i; […]

Wednesday, September 23rd, 2009