Hi all,
I am very new to using arrays and would like some help or pointers on how i can achieve the following.
I have so far managed to store data into a session array which when printed looks like this:
Array
(
[5] => Array
(
[quantity] => 1
[price] => 100.00
)
[6] => Array
(
[quantity] => 1
[price] => 200.00
)
[7] => Array
(
[quantity] => 1
[price] => 300.00
)
[8] => Array
(
[quantity] => 1
[price] => 400.00
)
[] =>
)
Basically the numbers 5 - 8 are the productid's, and you can see the key names which represent the amount the user has ordered (quanttiy) and how much the total price is for that order of that product.
I am now looking to establish the best way to display these arrays so the user can see each product on screen in a table row format (much like a shopping cart basket).
I have looked on google for 'exploding arrays' etc but there seems to be loads of different ways.
Can anyone provide a snippet of code to help explain how i do this please?
Thanks in advance.