Is there anyway to display images in a row based on pixels?
For instance, if I have two images and they measure 400 pixels together display them in one row
If my images measure > 400 pixels display each image in a single row.
Right now I am displaying images by count. How would I change this code to display by pixels? Should I use count and then an if, else statement? Or is there a better way to do this?
echo '<table><tr>'."\n"; //phpcode
$imagesperrow=2;
$count=0;
foreach ($path_array as $key => $value)
{
if($count%$imagesperrow==0 && $count!=0)
echo '</tr><tr>'."\n";
echo '<td><img src="'.$value.'" border=0 align="left"></td>'."\n";
$count++;
}
Thanks
Siobhan