Jump to content

Archived

This topic is now archived and is closed to further replies.

Moron

Multiple conditions in a while loop?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[code=php:0]
while( ($this == "yes") && ($that == "maybe") ){
  // Do the other stuff here
}
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.