
07-24-04, 10:35 AM
|
|
Newbie Coder
|
|
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
arrays
What's wrong with this:
PHP Code:
<?php
$products = array ( array ( array ("TIR", "Tires", 100),
array ("OIL", "Oil", 10),
array ("SPA", "Spark Plugs", 5)
),
array ( array ("TIR", "Tires", 100),
array ("OIL", "Oil", 10),
array ("SPA", "Spark Plugs", 5)
),
array ( array ("TIR", "Tires", 100),
array ("OIL", "Oil", 10),
array ("SPA", "Spark Plugs", 5)
),
);
for ($layer = 0; $layer < 3; $layer++)
{
echo "Layer $layer<br>";
for ($row = 0; $row < 3; $row++)
{
for ($col = 0; $col < 3; $col++)
{
echo "|".$catagories[$layer][$row][$col];
}
echo "|</br>";
}
}
?>
it's not displaying as i want it to display, here is the file:
http://www.jumpstartpunk.com/test/Chapter%203/array.php
|