Re: PHP and SQL into cells and rows
It's all about placement! Also, do your best to use PHP's echo as little as possible.
PHP Code:
<?php $row['local_link'] = 'testing'; ?>
<table border="1">
<tr>
<?php
$cols = 3;
for ($i = 0; $i < 15; $i++) {
?>
<td bgcolor="#009933"><a href="<?php echo $row['local_link']; ?>.m4v" name="video"><?php echo $row['local_link']; ?></a></td>
<td>
<video width="320" height="240" controls="controls">
<source src="<?php echo $row['local_link']; ?>.m4v" type="video/mp4" />
Your browser does not support the video tag.
</video>
</td>
<?php
if (($i + 1) % $cols == 0) { ?></tr><tr><?php }
}
?>
</tr>
</table>
Last edited by Brad Jones; June 26th, 2012 at 12:20 PM.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Bookmarks