Jump to content


Photo

Multiple conditions in a while loop?


  • Please log in to reply
1 reply to this topic

#1 Moron

Moron
  • Members
  • PipPipPip
  • Advanced Member
  • 368 posts

Posted 11 August 2006 - 02:44 PM

Can this be done?

while ($this = yes) and ($that = maybe) {

do $theother;

}

I know my syntax is rotten, but can a while loop have multiple conditions?

Thanks.


#2 HeyRay2

HeyRay2
  • Members
  • PipPipPip
  • Advanced Member
  • 223 posts

Posted 11 August 2006 - 02:51 PM

while( ($this == "yes") && ($that == "maybe") ){
   // Do the other stuff here
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users