Using Alternative syntax in .phtml file triggers errors


When I'm using PHP Alternative syntax in my .phtml files (Zend Framework) i get errors

Example of the code

<?php if ($name = 'maarten') : ?>
<span>Hi your name is Maarten!</span>
<?php else : ?>
<span>Your name is not Maarten?!</span>
<?php endif; ?>

In my editor I'll get red lines under the else statement saying "Expecting statement".
Is there a way to solve this?


1 comment
Comment actions Permalink

Hello Maarten,

It is known issue. Please vote -

Thank you for feedback!


Please sign in to leave a comment.