لغة PHP — الصفحة ٧٤

الفصل الثالث } Echo "<BR> END <BR>"; /* For example */ for ($i = 1;;$i++) { if ($i > 10) { break; } print $i; } Echo "<BR> END <BR>"; /* For example */ $i = 1; for(;;) { if ($i > 10) { break; } print $i; $i++; } Echo "<BR> END <BR>"; /* For example */ for ($i= 1; $i <= 10; print $i, $i++) ; التحكم (الشروط والتكرار ) <? /* foreach example: value only */ $a = array (1, 2, 3, 17); foreach ($a as $v) { print "Current value of \$a: $v.\n"; echo "<BR>"; } echo "<BR> End <BR>"; /* foreach example: value (with key printed for illustration) */ $a = array (1, 2, 3, 17); $i = 0; /* for illustrative purposes only */ foreach($a as $v) { مثال آخر ٧٤
ص ٧٤

النص مستخرج آليًّا من صور الكتاب، وقد يقع فيه خطأ.