note 80668 deleted from control-structures.alternative-syntax by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:35:39 +0000 |
| Subject: | note 80668 deleted from control-structures.alternative-syntax by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215215@lists.php.net to get a copy of this message | ||
Note Submitter: jeremia at gmx dot at
----
If you wan't to use the alternative syntax for switch statements this won't work:
<div>
<?php switch($variable): ?>
<?php case 1: ?>
<div>
Newspage
</div>
<?php break;?>
<?php case 2: ?>
</div>
Forum
<div>
<?php break;?>
<?php endswitch;?>
</div>
Instead you have to workaround like this:
<div>
<?php switch($variable):
case 1: ?>
<div>
Newspage
</div>
<?php break;?>
<?php case 2: ?>
</div>
Forum
<div>
<?php break;?>
<?php endswitch;?>
</div>