PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
anjanesh
DevNet Resident
Posts: 1679 Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India
Post
by anjanesh » Sun Aug 08, 2004 12:41 pm
The paramter for Break is a nice thing and wanted to use it. But Im not getting it to work.
Code: Select all
<?php
if (1==1)
{
if (2==3)
echo "2=3";
else
break 1;
echo "1==1";
}
?>
By the way the basic break which can be done in C also doesn't work in if {} blocks
Any way to solve this ? Or wasnt this the original intention of using break in php ?
Thanks
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Aug 08, 2004 12:58 pm
break doesn't work for anything outside loops... last I checked..