Example
Close a for loop block:
html
<?php
for($i = 0; $i < 10; $i += 2):
echo "$i <br>";
endfor;
?>
Definition and Usage
The endfor keyword is used to close the code block of a for loop which was started using the for(...): syntax.
Related Pages
The for keyword.