note 75893 added to control-structures.else
| From: | Eric at osu1 dot php dot net | Date: | Wed, 20 Jun 2007 16:42:48 +0000 |
| Subject: | note 75893 added to control-structures.else | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127833@lists.php.net to get a copy of this message | ||
<?
if ($a == 1):
/* nested if */
if ($b == 2) echo '2';
else:
/* other code */
endif;
?>
This is an older example of an if statement I believe this was used in php 3? I stated with for php
4. This would be the above statement up to date
<?php
if ($a == 1) {
$url = 'http://www.linksback.org';
if ($b == 2) { echo '2'; }
} else {
$url = 'http://www.hendersonpoolservice.info';
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 67.93.59.24
----
Manual Page -- http://www.php.net/manual/en/control-structures.else.php
Edit -- https://master.php.net/note/edit/75893
Del: integrated -- https://master.php.net/note/delete/75893/integrated
Del: useless -- https://master.php.net/note/delete/75893/useless
Del: bad code -- https://master.php.net/note/delete/75893/bad+code
Del: spam -- https://master.php.net/note/delete/75893/spam
Del: non-english -- https://master.php.net/note/delete/75893/non-english
Del: in docs -- https://master.php.net/note/delete/75893/in+docs
Del: other reasons-- https://master.php.net/note/delete/75893
Reject -- https://master.php.net/note/reject/75893
Search -- https://master.php.net/manage/user-notes.php