php for endfor

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


<?php

for ($i = 1; $i <= 10; $i++):

	echo $i;

endfor; 

?>

Classic syntax:


<?php

for ($i = 1; $i <= 10; $i++){

	echo $i;

}

?>

Leave a Comment