Migrating from PHP/FI 2 to PHP 3
PHP Manual

while syntax

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

Example#1 Migration: old while..endwhile syntax

while ($more_to_come);
    ...
endwhile;

Example#2 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.


Migrating from PHP/FI 2 to PHP 3
PHP Manual