note 124359 added to control-structures.alternative-syntax
| From: | jfo at drcloudemr dot com | Date: | Fri, 01 Nov 2019 07:26:06 +0000 |
| Subject: | note 124359 added to control-structures.alternative-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-212880@lists.php.net to get a copy of this message | ||
I realize that this is an old thread, but the real problem is that
if (isset($foo)): echo "Both are set.";
is missing an "endif;"
if (isset($foo)): echo "Both are set."; endif;
<?php
$foo = 'foo';
$bar = 'bar';
if (isset($bar)):
if (isset($foo)): echo "Both are set."; endif;
elseif (isset($foo)):
echo "Only 'foo' is set.";
else:
echo "Only 'bar' is set.";
endif;
----
Server IP: 208.43.231.9
Probable Submitter: 82.199.157.54 (proxied: 67.171.144.214)
----
Manual Page -- http://php.net/manual/en/control-structures.alternative-syntax.php
Edit -- https://master.php.net/note/edit/124359
Del: integrated -- https://master.php.net/note/delete/124359/integrated
Del: useless -- https://master.php.net/note/delete/124359/useless
Del: bad code -- https://master.php.net/note/delete/124359/bad+code
Del: spam -- https://master.php.net/note/delete/124359/spam
Del: non-english -- https://master.php.net/note/delete/124359/non-english
Del: in docs -- https://master.php.net/note/delete/124359/in+docs
Del: other reasons-- https://master.php.net/note/delete/124359
Reject -- https://master.php.net/note/reject/124359
Search -- https://master.php.net/manage/user-notes.php