[PHP-DEV] Bug #9306 Updated: while and multiple conditions

2001-04-29 Thread sniper

ID: 9306
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Closed
Bug Type: Unknown/Other Function
PHP Version: 4.0.1pl2
Assigned To: 
Comments:



Previous Comments:
---

[2001-02-16 15:47:22] [EMAIL PROTECTED]
$i = 0;
$NR_CASES = 5;

while( $row = mysql_fetch_object($queryh, MYSQL_ASSOC)  $i  
$NR_CASES ) {
$i++;
?
tr align=left
td
FONT SIZE = 2
?  echo $i . :  . $row-head; ? 
/FONT
/td
/tr
?
}

if i dont include  $i  $NR_CASES, $row-head will print.
if i include it (like now), i wont get anything.

wierd huh ?

im sorry i have no clue about the mods etc for php, im not the one who compiled it 
here.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9306edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9306 Updated: while and multiple conditions

2001-04-28 Thread elixer

ID: 9306
Updated by: elixer
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
PHP Version: 4.0.1pl2
Assigned To: 
Comments:

I believe this is because of operator precedence.  = has a lower precedence than 


Try adding parenthesis to your statement like this:

while( ($row = mysql_fetch_object($queryh, MYSQL_ASSOC))  $i  $NR_CASES )

Sean


Previous Comments:
---

[2001-02-16 15:47:22] [EMAIL PROTECTED]
$i = 0;
$NR_CASES = 5;

while( $row = mysql_fetch_object($queryh, MYSQL_ASSOC)  $i  
$NR_CASES ) {
$i++;
?
tr align=left
td
FONT SIZE = 2
?  echo $i . :  . $row-head; ? 
/FONT
/td
/tr
?
}

if i dont include  $i  $NR_CASES, $row-head will print.
if i include it (like now), i wont get anything.

wierd huh ?

im sorry i have no clue about the mods etc for php, im not the one who compiled it 
here.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9306edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]