$img_count = 0;
echo("
<table>
<tr>
  <td colspan=5>My Images</td>"):

(loop through filenames)
{
    if (($img_count % 5) == 0) echo("
</tr><tr>");
    echo("
<td><img_src=\"$filename\"></td>");
    $img_count = $img_count + 1;
}
while (($img_count % 5) != 0)
{
    echo("
<td>&nbsp;</td>");
}
echo("
</tr>
</table>")


Matt
RClark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello all!
>
> Ok, I have a readdir() reading pictures files from a directory. But now I
> want to output them into a html table, say 5 across the top row, then 5
the
> next row, etc. What I cant figure out is how to make this happen. Right
now,
> I am not reading the files into an array. Should I do this and then create
a
> while loop?
>
> Thanks,
> Ron Clark
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to