470,815 Members | 1,125 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

DO WHILE with OR not working?

Hello I want to use the DO WHILE statement with an OR ( || )

like this:

do{
......
}while ($found != 1 || $count == 10);
But this is nog working in PHP 4.4 . Anybody know how to do this?

Thanks!
Jan 4 '06 #1
1 1331
Eric Rechter wrote:
Hello I want to use the DO WHILE statement with an OR ( || )

like this:

do{
.....
}while ($found != 1 || $count == 10);

But this is nog working in PHP 4.4 . Anybody know how to do this?


What is the rest of the loop, and what are the values of $count and
$found before it starts?

Your while is saying to do the loop again only if $found is not 1 and
$count *is* 10... possibly should be:

while ($found != 1 || $count < 10);

?? without knowing what you want to do, it's impossible to say...

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Jan 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

198 posts views Thread by Michael N. Christoff | last post: by
8 posts views Thread by CAFxX | last post: by
1 post views Thread by ziga.seilnacht | last post: by
8 posts views Thread by Hardy Wang | last post: by
4 posts views Thread by Sebastian Böck | last post: by
19 posts views Thread by abcd | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.