In response to mused.biz's comment:
> Incrementing two variables together can also be achieved, eg:
>
> for ($j = "a", $k = "1"; $j <= "f", $k <= "6" ; $j++, $k++)
Note that the statement:
$j <= "f"
has absolutely no effect on this loop (which isn't to say it doesn't get evaluated), because it is separated from the following statement by a comma. If $j were to exceed the value "f" before $k exceeded "6", the loop would still continue.
However, the statement:
<?php
for ( $i = 0; $i++, $i < 10; $i++ )
echo $i . '<br/>';
?>
will result in the following:
1
3
5
7
9
because $i is incremented before the condition is evaluated, in addition to it being incremented after the completion of each loop.