note 80529 added to control-structures.alternative-syntax
| From: | munim2020 at gmail dot com | Date: | Sun, 20 Jan 2008 21:41:22 +0000 |
| Subject: | note 80529 added to control-structures.alternative-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135267@lists.php.net to get a copy of this message | ||
Note:
The alternate syntax works if you want to output any HTML based on some conditions.
<?php if($condition): ?>
html here...
<?php else: ?>
other html here...
<?php endif; ?>
if you use the curly braces syntax for an if statement across a <?php ?> tag shown as above,
the parser will give errors.
----
Server IP: 203.199.124.111
Probable Submitter: 122.167.6.208
----
Manual Page -- http://www.php.net/manual/en/control-structures.alternative-syntax.php
Edit -- https://master.php.net/note/edit/80529
Del: integrated -- https://master.php.net/note/delete/80529/integrated
Del: useless -- https://master.php.net/note/delete/80529/useless
Del: bad code -- https://master.php.net/note/delete/80529/bad+code
Del: spam -- https://master.php.net/note/delete/80529/spam
Del: non-english -- https://master.php.net/note/delete/80529/non-english
Del: in docs -- https://master.php.net/note/delete/80529/in+docs
Del: other reasons-- https://master.php.net/note/delete/80529
Reject -- https://master.php.net/note/reject/80529
Search -- https://master.php.net/manage/user-notes.php