vaillant
Newbie
Karma: +0/-0
Offline
Posts: 1
|
 |
« on: January 29, 2009, 05:20:44 AM » |
|
Hi,
$catalog is a 2d array.
By doing this:
foreach($catalog as $key => $value) { echo $key."=>".$catalog[$key]['desc']." ".$catalog[$key]['price']." "; }
I get this:
101=>AA batteries (pack of 2) 2.90 102=>AA batteries (pack of 4) 5.49 103=>Backpack (black) 69.99 104=>Money belt with 6 compartments 13.49 105=>Haversack (red) 199.99 106=>Swiss Army knife (6 blades) 24.00 107=>Duffel bag (steel gray) 28.50
Now when I do:
sort($catalog); foreach($catalog as $key => $value) { echo $key."=>".$catalog[$key]['desc']." ".$catalog[$key]['price']." "; }
|