PHP Arrays – how do i echo this!?
May 21st, 2010
Alright i have been given this array as an assignment:
$products = array(‘Jacket’ => array(‘Rain Coat’,'19.95′,’10.00′),
‘TV Stand’=> array(‘TV Unit’,'99.50′,’9.95′),
‘Computer’ => array(‘Laptop’,'425.99′, ‘48.30′));
What I need to do is to echo these values 99.50, 19.95 and 425.99. I want to know how to do that. I have tried doing this
echo $products[0][1];
and things along those line but it doesn’t echo out as i expect.

Twitter
1 Comment