$arr = array ('jedna', 'dv∞', 't°i', 'Φty°i', 'stop', 'p∞t');
while (list (, $val) = each ($arr)) {
if ($val == 'stop') {
break; /* Tady byste mohli napsat takΘ 'break 1;'. */
}
echo "$val<br>\n";
}
/* Pou╛itφ nepovinnΘho argumentu. */
$i = 0;
while (++$i) {
switch ($i) {
case 5:
echo "P°i 5<br>\n";
break 1; /* UkonΦuje pouze switch. */
case 10:
echo "P°i 10; konec<br>\n";
break 2; /* UkonΦuje switch a while. */
default:
break;
}
} |