note 89158 added to control-structures.if
| From: | plattecountyducks at yahoo dot com | Date: | Tue, 24 Feb 2009 15:44:27 +0000 |
| Subject: | note 89158 added to control-structures.if | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-151074@lists.php.net to get a copy of this message | ||
I'm wondering about this statement. I found it in phpshop, an open source ecommerce project.
<?php
if (SOMEPREDEFINEDENTITY) :
?>
<!-- some HTML code goes here -->
<?php
endif;
?>
<!-- etc., etc... -->
In debugging the section of code, it seems that no matter what the value of the condition, the HTML
code is parsed. I may have seen this before, but it's not coming up on my radar screen. What
does the colon (:) mean? Why does it matter if this is present if the HTML code is always parsed?
----
Server IP: 64.71.164.2
Probable Submitter: 98.100.99.186
----
Manual Page -- http://www.php.net/manual/en/control-structures.if.php
Edit -- https://master.php.net/note/edit/89158
Del: integrated -- https://master.php.net/note/delete/89158/integrated
Del: useless -- https://master.php.net/note/delete/89158/useless
Del: bad code -- https://master.php.net/note/delete/89158/bad+code
Del: spam -- https://master.php.net/note/delete/89158/spam
Del: non-english -- https://master.php.net/note/delete/89158/non-english
Del: in docs -- https://master.php.net/note/delete/89158/in+docs
Del: other reasons-- https://master.php.net/note/delete/89158
Reject -- https://master.php.net/note/reject/89158
Search -- https://master.php.net/manage/user-notes.php