print_r($getPrice) result is:
Array
(
[0] => Array
(
[price_id] => 5
[price_qty] => 2
[price] => 100.0000
)
[1] => Array
(
[price_id] => 6
[price_qty] => 5
[price] => 90.0000
)
[2] => Array
(
[price_id] => 7
[price_qty] => 8
[price] => 80.0000
)
)
i want to loop out the value of [price_qty] and [price], i am sorry, i am a newbie of php, i don’t know how to use foreach to output them value.
Or if you prefer a
forloop:There are other ways of looping through arrays as well, for instance: using
current()andnext().