Is there any reason to use one foreach
syntax instead of another?
foreach (array_expression as $value) {
// statements
}
or
foreach (array_expression as $value) :
// statements
endforeach;
They are completely equivalent, as stated in the official manual of PHP.
See here for more info:
http://php.net/manual/en/control-structures.foreach.php
Most times the foreach ... endforeach
version is used in "templates". So it's easier for you to follow the logic of templates.