note 31980 added to control-structures.alternative-syntax
| From: | dvdmandt at hotmail dot com | Date: | Sun, 11 May 2003 21:53:33 +0000 |
| Subject: | note 31980 added to control-structures.alternative-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47847@lists.php.net to get a copy of this message | ||
Alternative syntax is useful when you have lots of control structures on top of eachother...
if($a)
{
while($b)
{
if($c)
{
// Some code here
}
else
{
for($x=0;$x<10;$x++)
{
// Some code here
}
}
}
}
else
{
// Some code here
}
At some point you might want to findout which } belongs to the while loop... That's when you
realize it would be much better with
while($b):
endwhile;
Case anybody feels like mailing me, replace hotmail.com with telia.com...
--
http://www.php.net/manual/en/control-structures.alternative-syntax.php
http://master.php.net/manage/user-notes.php?action=edit+31980
http://master.php.net/manage/user-notes.php?action=delete+31980
http://master.php.net/manage/user-notes.php?action=reject+31980