Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2001032

RE: [PHP] Printing MySQL into HTML Tables From: ..s.c.o.t.t.. [gts] (scott <email protected>)
Date: 03/22/01

modulus also works for finding even nums:

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

> -----Original Message-----
> From: darion mapp [mailto:godd_mapp <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: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>