note 52571 deleted from language.control-structures by betz
| From: | betz@php.net | Date: | Wed, 24 May 2006 21:16:29 +0000 |
| Subject: | note 52571 deleted from language.control-structures by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-111966@lists.php.net to get a copy of this message | ||
Note Submitter: macristo[AT]gmx[DOT]net
----
It is not mandatory to use the parentheses in an if-statement.
This is an if-statement on one line and it's perfectly valid code:
<?php
$a = "foo";
if ("foo" == $a) echo "bar";
?>
will output:
"bar"