I use brackets when using foreach loops. What is endforeach for?
Using foreach: ... endforeach; does not only make things readable, it also makes least load for memory as introduced in PHP docs So for big apps, receiving many users this would be the best solution
foreach:
endforeach;