Thanks to some great help I got on this forum, I have a "foreach" statement burrowing through an array which produces a nice series of images on a popup page, according to a user's selection on the parent page. It looks like this:
<?php
$DatabaseArray = file("ProdDatabase.txt");
foreach($DatabaseArray as $row) {
$DBline = explode(',', $row);
if ($DBline[0] == $ColChoiceProdTag) {
$ColourInfo = explode("*", $DBline[4]);
$ColourInfoLength = count($ColourInfo);
for($i=1; $i<$ColourInfoLength-1; $i++) {
$part = explode(':', $ColourInfo[$i]);
$ID = $part[0];
$ColourName = $part[1];
echo '<br><center><img src="images/swatch'.$ID.'.jpg" alt="'.$ID.': '.$ColourName.'" onclick="SetImage(this.alt,this.src)"><BR><br></center>';
}
}
}
?>
But the images are just churned out one after the other, vertically on the page in a single column. So I'm wondering how to coax the output into a three-column table. (I've only just bought my php manual, so don't laugh if this is a really simple question!)