Re: Question
| From: | Hugh Danaher | Date: | Mon, 10 Mar 2003 20:43:25 +0000 |
| Subject: | Re: Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139025@lists.php.net to get a copy of this message | ||
something like:
print "<table>";
while ( statement )
{
$i++;
if ($i==1) print "<tr>";
print "<td>";
your image code;
print "</td>";
if ($i==4)
{
print "</tr>";
unset($i);
}
}
if ($i==1) print
"<td></td><td></td><td></td></tr>";
if ($i==2) print "<td></td><td></td></tr>";
if ($i==3) print "<td></td></tr>";
print "</table>";
might work better.
hugh
----- Original Message -----
From: "Clint Tredway" <ctredway@LEEFIN.COM>
To: "PHP" <php-general@lists.php.net>
Sent: Monday, March 10, 2003 11:53 AM
Subject: [PHP] Question
> I have a display of images that every fourth image I want to start a new
> column. In ColdFusion I would use the MOD operator like this:
>
> if query.recordcount MOD 4 eq 0
> </td>
> <td>
> /if
>
> I am just having a brain lapse today, can someone help me do this same
> functionality in PHP?
>
> Thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>