I have a multidemensional arrray I am working with. I want to display a border around each of the items displayed. Right now it places a border around the first row, but none in the rest of the rows.
here is what I have.
<?php
$products = array(
array( Code => "TIR", Description => "Tires", Price => 100 ),
array( Code => "OIL", Description => "Oil", Price => 10),
array( Code => "SPK", Description => "Spark Plugs", Price=> 4));
echo "<br><table border='1'><tr>";
// I like to put a while loop inside a for loop
for ( $row = 0; $row < 3; $row++)
{
while (list($key, $value) = each($products[$row]))
{
echo "<td border='1'>$value </td>";
}
echo " <br></tr><table>";
}
?>
What am I doing wrong here. I ma new to programming and am just testing and seeing how things work.