Sveta
Guest
Как вывести значения массива
У меня есть массив в переменной $boat
Как достать из него все значения элементов option ?
т.е.
У меня есть массив в переменной $boat
PHP:
Array
(
[configuration] => Array
(
[request] => Order
[status] =>
)
[billing] => Array
(
[pono] =>
[dealerloadno] =>
[terms] =>
[submit_order] => Y
)
[order] => Array
(
[type] => S
[reqshipdate] =>
[retailcusname] =>
[retailcusemail] =>
[order_no] =>
[trailer_order_no] =>
[boatonly] => Y
)
[instructions] => Array
(
[value] =>
)
[metalflake] => Array
(
[requested] =>
[size] =>
)
[decal] => Array
(
[displayed] => Y
[instructions] =>
)
[mcbydesign] => Array
(
[value] =>
)
[consumer] => Array
(
[dab_id] =>
[user_id] =>
[comments] =>
)
[model] => Array
(
[id] => MS230X30BACKSIDE.06
[version] => 1
[tech_grp] => MBCBOAT
[option] => Array
(
[id] =>
[label] =>
[choiceid] =>
[choice] =>
)
[options] => Array
(
[0] => Array
(
[id] => COLOR1
[label] => Hull 1
[choice] => WHITE
[choiceid] => white
)
[1] => Array
(
[id] => COLOR2
[label] => Hull 2
[choice] => VIPER RED
[choiceid] => viperred
)
[2] => Array
(
[id] => COLOR3
[label] => Deck 2
[choice] => WHITE
[choiceid] => white
)
[3] => Array
(
[id] => COLOR4
[label] => Deck 1
[choice] => MIDNITE BLACK
[choiceid] => midniteblack
)
[4] => Array
(
[id] => GRAPHICS5
[label] => Graphics
[choice] => MIDNITE BLACK
[choiceid] => midniteblack
)
)
)
)
т.е.
PHP:
$boat['model']['option'][$id]['id']
$boat['model']['option'][$id]['label']
$boat['model']['option'][$id]['choised']
$boat['model']['option'][$id]['choice']