Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Appendices : Migrating from PHP/FI 2 to PHP 3 : while syntax

while syntax

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

Example F.7. Migration: old while..endwhile syntax

while ($more_to_come);
   ...
endwhile;
?>


Example F.8. Migration: new while..endwhile syntax

while ($more_to_come):
   ...
endwhile;
?>


Warning:

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

Change Language


Follow Navioo On Twitter
About the incompatibilities in 3.0
old_function
Start/end tags
if..endif syntax
while syntax
Expression types
Error messages have changed
Short-circuited boolean evaluation
Function TRUE/FALSE return values
Other incompatibilities
eXTReMe Tracker