modulus also works for finding even nums:

if ($i % 2) { 
  // not even
}


> -----Original Message-----
> From: darion mapp [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Printing MySQL into HTML Tables
> 
> 
> now it seems like you know what is to be done and you are not willing to 
> do the work. Now i have not tested this and you may have to do some work 
> with it but you get the picture. if you lookup the syntax and ensure how 
> to use the command then you will be ok.
> of course if you still have problems then let em know
> 
> 
> FOR($i = 0;$i < $numrows; ++$i)
> {
> echo"<tr><td>$mysql_result($resultidentiferfromquery, $i, 
> fieldwithproduct)</td><td>$mysql_result($resultidentiferfromquery, ++$i, 
> fieldwithproduct)</td></tr>";
> echo"<tr><td>$mysql_result($resultidentiferfromquery, ++$i, 
> fieldwithproduct)</td><td>&nbsp;</td></tr>";
> if($i/2 > 0) //not even
> {
> echo"<tr><td>&nbsp;</td>><td>&nbsp;</td></tr>";
> }
> }


-- 
PHP General 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]

Reply via email to