I have a piece of code that parses my xml file (which contains the filenames of a bunch of thumbnails) into a multidimension array (because there is other data like captions).
I want to write a table on the fly that contains each thumbnail in a cell.
My problem is that I want 4 images per table row and I can't seem to figure out how to go about this.
The for loop I have at the moment echoes everything into 1 row. The code below is incomplete but if someone could please take a look at it and tell me what you think I would be forever grateful.
<?php
echo "<table border=0 cellpadding=0 cellspacing=0 width=572>" ;
echo "<tbody>";
echo "<tr>";
for( $i=0 ; $i < $person_counter ; ++$i )
{
$thisName = $person_data[$i]["imagetype"];
if ($thisName == $article) {
echo "<td>";
echo "<b>we have match at position number: ". $i . "</b><br>--";
echo $person_data[$i]["imagetype"];
echo "--";
echo " <img src=\"";
echo "./images/thumbs/" . $person_data[$i]["filename"];
echo "\">";
echo "------";
echo $person_data[$i]["headline"];
echo "<br>";
echo "</td>";
}
$thisPos = $i;
}
echo "</tr>";
echo "</table>";
//<a href="image.php?articvle=$nextOne&mytype=$mytype">next</a>
?>