abstract:$arr = [1, 2, 3, 4, 5];
//echo count($arr);
for ($i = 0; $i < count($arr); $i++) {
echo $arr[$i];
}
$i = count($arr);
while ($i--) {
echo $arr[$i];
}
foreach ($arr as $a) {
echo $a;
}
?>php循环的三种方式
Correcting teacher:天蓬老师Correction time:2019-05-10 16:01:55
Teacher's summary:实际工作中, 其实用得最多的是foreach, while