Hi
Normally I would use the mysql_fetch_array command to get vallues from a DB array to print in seperate tables like below:
echo "<table width=\"100%\" border=\"1\"body bgcolor=\"#ffffff\"align=\"center\"text=\"#ffffff\">";
echo "<th>THUMBNAIL</th><th>NAME</th><th>SIZE</th><th>LOCATION</th>";
while($r = mysql_fetch_array($TagSearch))
{
$Code = $r["Code"];
$Name = $r["Name"];
$Size = $r["Size"];
$ImgPath = $r["ImgPath"];
$PurchaseDate = $r["PurchaseDate"];
$StartCycle = $r["StartCycle"];
$CycleLength= $r["CycleLength"];
$Location = $r["Location"];
$Status = $r["Status"];
$idClient = $r["idClient"];
$ShipTo = $r["ShipTo"];
$Medium = $r["Medium"];
echo "<tr>";
print "<td align='center'><a href=art.php?Code={$Code}><img src='{$ImgPath}' height=75 width=75 border='0' /></a></td><td align='center'>$Name</td><td align='center'>$Size</td><td align='center'>$Location</td>";
echo "</tr>";
How would I go about doing the same thing with a normal array
I tried:
echo "<table width=\"100%\" border=\"1\"body bgcolor=\"#ffffff\"align=\"center\"text=\"#ffffff\">";
echo "<th>CODES</th><th>THUMBNAIL</th><th>NAME</th><th>SIZE</th><th>MEDIUM</th><th>PRICE</th>";
while($r = current($_SESSION["Cart"]))
{
$Code = $r["Code"];
$ImgPath = $r["ImgPath"];
$Name = $r["Name"];
$Size = $r["Size"];
$Price = $r["Price"];
$Medium = $r["Medium"];
echo "<tr>";
print "<td align='center'>$Code</td><td align='center'><a href=art.php?Code={$Code}><img src='{$ImgPath}' height=75 width=75 border='0' /></a></td><td align='center'>$Name</td><td align='center'>$Size</td><td align='center'>$Medium</td><td align='center'>$Price</td>";
echo "</tr>";
Now all that does is print the first value in the array over and over.
I would love to use a method close to the first one to do this.
Any suggestions?