Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
该手册引用了大多数使用冒号的控制结构的替代语法,但我没有看到用于 do-while 循环的语法。有可能这样做吗?像这样的东西:
//Simple example $arr = array(1,2,3,4,5,6); $i = 0; do : echo $arr[$i].'<br/>'; $i++; while($i < count($arr)) endwhile;
从手册: -
do-while 循环只有一种语法:
$i = 0; do { echo $i; } while ($i > 0);