I use brackets when using foreach loops. What is endforeach for?
It's the end statement for the alternative syntax:
foreach ($foo as $bar) : ... endforeach;
Useful to make code more readable if you're breaking out of PHP:
<?php foreach ($foo as $bar) : ?> <div ...> ... </div> <?php endforeach; ?>