Reply to Re: help formatting table output columns

Your name:

Reply:


Posted by Jeremy on 12/27/06 00:32

Hmmm ok, I get the concept but I'm having trouble making it work within the
framework of what I already have. Do I maybe need to rewrite the below
somehow for this?


<?
$dir = './video_admin/movies/meta/';
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if($file != '.' && $file != '..')
{
$tmp = array($file);
$tmp = array_merge($tmp,file($dir.$file));
$files[] = $tmp;
}
}
closedir($dh);
}

if(is_array($files))
foreach($files as $movie)
{


echo "<td><div class=\"description\"><h3>{$movie[3]}
</h3>";
$i = 4;
while($movie[$i] != '')
{
$description .= $movie[$i++];
}
echo "<p>{$description}</p>
<a href='/watch.php?m={$movie[0]}'>Watch</a></div>";
$description = '';
echo "<a href='/watch.php?m={$movie[0]}'><img src=
\"./video_admin/movies/thumbs/{$movie[2]}\" /></a>";
echo "<div style=\"clear:both;height:1%\"></div>
</div></td>";
}


?>


blthecat@ckdog.co.uk (Geoff Berrow) wrote in
<msd3p25lqb0vcb5cm8shck70j0n02tb4mq@4ax.com>:

>Message-ID: <98A5A9F1Akarlcsueduco@216.196.97.136> from Jeremy contained
>the following:
>
>> I'm kind of new to php - I assume
>>what I need to do is set some kind of counter starting at a value of 1
>>at which point I create the opening <tr> tag. Then I increment the
>>counter by 1 and every time it gets to 3 I make the closing </tr> tag
>>and reset back to 1?
>
>Yes, or you could use the modulus operator
>http://uk2.php.net/operators.arithmetic
>

[Back to original 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

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