note 124481 added to control-structures.elseif
| From: | M.H.S@php.net | Date: | Fri, 06 Dec 2019 17:10:16 +0000 |
| Subject: | note 124481 added to control-structures.elseif | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213403@lists.php.net to get a copy of this message | ||
Bad coad:
<?php
if ($condition_1 === true)
{
// Coad
}
if ($condition_1 === false && $condition_2 === true)
{
// Coad 2
}
if ($condition_1 === false && $condition_2 === false)
{
// Coad 3
}
?>
Good coad:
<?php
if ($condition_1) :
// Coad 1
elseif ($condition_2) :
// Coad 2
else:
// Coad 3
endif;
?>
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.168 (proxied: 5.212.233.171)
----
Manual Page -- http://php.net/manual/en/control-structures.elseif.php
Edit -- https://master.php.net/note/edit/124481
Del: integrated -- https://master.php.net/note/delete/124481/integrated
Del: useless -- https://master.php.net/note/delete/124481/useless
Del: bad code -- https://master.php.net/note/delete/124481/bad+code
Del: spam -- https://master.php.net/note/delete/124481/spam
Del: non-english -- https://master.php.net/note/delete/124481/non-english
Del: in docs -- https://master.php.net/note/delete/124481/in+docs
Del: other reasons-- https://master.php.net/note/delete/124481
Reject -- https://master.php.net/note/reject/124481
Search -- https://master.php.net/manage/user-notes.php