while(list($key, $value) = each($array)){
...
}
Loop over an array with a array_shift
while ($page = array_shift($pages)) {
$page ...
}
while (++$i) {
switch ($i) {
case 5:
break 1; /* Exit only the switch. */
case 10:
break 2; /* Exit the switch and the while. */
default:
break;
}
}