Php How To Stop A Loop From Looping When A Comparison Is True

Mobile
feeds
Welcome Login | Register

Php How To Stop A Loop From Looping When A Comparison Is True
  Forums Index
      » PHP Forums
        » » php how to stop a loop from looping when a comparison is true



Php How To Stop A Loop From Looping When A Comparison Is True
Post Description:
Post Tags: php, how, to, stop, a, loop, from, looping, when, a, comparison, is, true, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 379 Times Since Mon Feb 25, 2008 5:59 am Posted By jak with 2 replies
Next Post »» how to check if array is empty or false value
Php How To Stop A Loop From Looping When A Comparison Is True
i want to know how i can stop a loop from looping once an error has been found

for example i have this

while ($this > $that){
if($this == $that) {
echo 'stop this';
}
}


Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About Php How To Stop A Loop From Looping When A Comparison Is True




:: 1 :: Reply #43019 Reply By hostman On Mon Feb 25, 2008 6:01 am
i think you can continue
use do this:

while ($this > $that){
if($this == $that) {
continue;
}
}

i wonder if you can use these?


break
exit
:: 2 :: Reply #75408 Reply By mupparion On Tue Oct 14, 2008 5:15 am
while ($this > $that){
if($this == $that) {
break;
}
}

will work perfectly