You are here: Re: Listing problem -thanks « All PHP « IT news, forums, messages
Re: Listing problem -thanks

Posted by highway of diamonds on 11/06/05 17:40

highway of diamonds wrote:
> I'm listing a directory of image files. It is quite long so i wanted to
> break it into four columns. I'm using the code below which works well
> in mozilla firefox but breaks in IE and Opera.
>
> Is there a better way of doing this?
>
> I'm using this to list them in a table of 4 columns:
>
> $flag=0;
> echo "<table width=\"80%\" border=\"1\" cellspacing=\"0\"
> cellpadding=\"3\" >";
> echo "<tr>";
>
> while($file=readdir($dir) )
> {
> $flag++;
> if ($flag<5)
> {
> echo "<td>".$file."</td>";
> }
> else
> {
> echo "</tr>";
> $flag=0;
> echo "<tr>";
> }
> }
> if ($flag<5)
> {
> echo "</tr>";
> }
> echo "</table>";
Juglesh and Aturo, thanks for you suggestions.

<blush mode on>
I'm afraid I found an unclosed <br /> tag further up the code.
<blush mode off>

That's what happens I suppose, had been at it too long yesterday.

R.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация