【发布时间】:2021-06-01 20:18:06
【问题描述】:
当我运行下面给出的代码时,它不会在浏览器中输出任何内容。 我究竟做错了什么?请帮忙。
$ages = [0, 4, 8, 12, 16, 20];
while($age = current($ages)){
echo $age.",";
next($ages);
}
【问题讨论】:
-
提示:
current($ages)在第一次迭代中返回什么?