Endfor

/**
 * Endfor.
 */
<?php
for ($i = 1; $i <= 10; $i++): echo $i; endfor; ?>
/**
 * Classic syntax.
 */
<?php
for ($i = 1; $i <= 10; $i++){ echo $i; } ?>

Syntax with “endfor” used mostly in complex templates where easier to find “endfor” than “}”:

Advertisements