note 89158 rejected from control-structures.if by danbrown
| From: | danbrown@php.net | Date: | Tue, 24 Feb 2009 15:44:53 +0000 |
| Subject: | note 89158 rejected from control-structures.if by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151075@lists.php.net to get a copy of this message | ||
Note Submitter: plattecountyducks at yahoo dot com
----
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?