【PHP】19. for 與 foreach迴圈
【PHP】19. for 與 foreach迴圈
作者: 進度條編輯群
更新日期:
在前一堂課我們有提到for迴圈與while迴圈的關聯性,我們先來複習一下for迴圈和while迴圈的執行結果:
首先我們可以看到上節教到while迴圈寫法會是這樣子,
<?php
$array = ["小明", "老王", "小美"];
$index = 0;
while ( $index < count($array)) {
&nbs
$array = ["小明", "老王", "小美"];
$index = 0;
while ( $index < count($array)) {
&nbs
預覽內容到此為止...還有其他剩下內容喔!!