Syntax with "endif" used mostly in complex templates where easier to find "endif" than "}":
<?php if( $a > $b ): echo $a.' is greater than '.$b; elseif( $a < $b ): echo $a.' is less than '.$b; else: echo $a.' equals '.$b; endif; ?>
Classic syntax:
<?php if( $a > $b ) { echo $a.' is greater than '.$b; } elseif( $a < $b ) { echo $a.' is less than '.$b; } else { echo $a.' equals '.$b; } ?>
Thanks for this