How could you make the "while" command satisfy multiple inequalities, like so:
while ($num < $other) AND ($num < $numrows) { }
when I run it as is, I get
Parse error: parse error, unexpected T_LOGICAL_AND
You can't afaik
while($thisevaluatestruelongest == true){ if($thisevaluatestrueless == true){ dostuff(); } doOtherStuff(); }
I take it all back
$i=0; $x=0; while( ($x <= 11) || ($i <= 10) ){ echo $i." ".$x."<br>"; $i++; $x++; }
great, thanks
What if you try:
while (($num < $other) && ($num < $numrows)) { }
?
I suspect the problem actually lies in your mismatched parentheses.
EDIT:
though in your example, it should be better to determine which is smaller, $other or $numrows, then apply the conditional. This is better than repeating the test with $num on each iteration.