Sintaxis similar a C
<?php
for ($loop = -5; $loop < 5; $loop++) {
if ($i < 0) {
echo "-";
} elseif ($i > 0) {
echo "+";
}
echo "$loop<BR>\n";
}
while(--$loop) {
switch($i % 2) {
case 0:
echo "Even<BR>\n";
break;
case 1:
echo "Odd<BR>\n";
break;
}
}
do {
echo "$loop<BR>";
} while (++$loop < 10);
?>