PHP 手冊
上一頁 | 附錄 D.Migrating from PHP/FI 2 to PHP 3 | 下一頁

# while syntax

Just like with if..endif, the syntax of while..endwhile has changed as well:

示範 D-7.Migration: old while..endwhile syntax

`while ($more_to_come); ... endwhile;`

示範 D-8.Migration: new while..endwhile syntax

`while ($more_to_come): ... endwhile;`

切記!
If you use the old while..endwhile syntax in PHP 3.0, you will get a never-ending loop.

上一頁 | 最開頭 | 下一頁
if..endif syntax | 上一層 | Expression types