[thelist] PHP Logic help

Chris Ditty cditty at gmail.com
Thu Jan 20 22:50:09 CST 2005


Hi all.  I am having some logic issues that I just can't get tonight. 
Hopefully someone can help.

I want to show multiple items on a row but can't get the logic right. 
I know this shouldn't be hard, but the code ain't flowing right now.

Thanks
Chris

<?
$categoryInfo[1][productID] = "1";
$categoryInfo[1][productName] = "I'm Not Bluffing";
$categoryInfo[1][productDesc] = "blah blah blah blah blah blah blah blah blah";
$categoryInfo[1][productImage] = "pweight_101.jpg";
$categoryInfo[1][productWeight] = "1.1oz";
$categoryInfo[1][productPrice] = "15.99";
$categoryInfo[1][productQty] = "100";
$categoryInfo[1][productAdded] = "2005-01-10 13:09:34";

$categoryInfo[2][productID] = "2";
$categoryInfo[2][productName] = "I'm Not Bluffing 2";
$categoryInfo[2][productDesc] = "blah blah blah blah blah blah blah
blah blah blah";
$categoryInfo[2][productImage] = "pweight_101.jpg";
$categoryInfo[2][productWeight] = "1.1oz";
$categoryInfo[2][productPrice] = "17.99";
$categoryInfo[2][productQty] = "100";
$categoryInfo[2][productAdded] = "2005-01-10 13:09:34";

foreach($categoryInfo as $products){
?>
	<div class="content padding">
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
		<tr>
			<td align="center"><p><a
href="products.php?c=<?=$_GET['c'];?>&p=<?=$products['productID'];?>"
title="read more about <?=$products['productName'];?>"><img
src="images/productpics/<?=$products['productImage'];?>"></a></p>
			<p class="time"></p>
			<h2><center><a
href="products.php?c=<?=$_GET['c'];?>&p=<?=$products['productID'];?>"
title="read more about
<?=$products['productName'];?>"><?=$products['productName'];?></a><br><?=$products['productPrice'];?></center></h2></td>
			<td align="center"><p><a
href="products.php?c=<?=$_GET['c'];?>&p=<?=$products['productID'];?>"
title="read more about <?=$products['productName'];?>"><img
src="images/productpics/<?=$products['productImage'];?>"></a></p>
			<p class="time"></p>
			<h2><center><a
href="products.php?c=<?=$_GET['c'];?>&p=<?=$products['productID'];?>"
title="read more about
<?=$products['productName'];?>"><?=$products['productName'];?></a><br><?=$products['productPrice'];?></center></h2></td>
		</tr>
	</table>
	</div>
<?
}
?>


More information about the thelist mailing list