Syntax with "endfor" used mostly in complex templates where easier to find "endfor" than "}":
<?php
for ($i = 1; $i <= 10; $i++):
echo $i;
endfor;
?> |
<?php
for ($i = 1; $i <= 10; $i++):
echo $i;
endfor;
?>
Classic syntax:
<?php
for ($i = 1; $i <= 10; $i++){
echo $i;
}
?> |
<?php
for ($i = 1; $i <= 10; $i++){
echo $i;
}
?>