This is my array in php $hotels
Array
(
[0] => Array
(
[hotel_name] => Name
[info] => info
[rooms] => Array
(
[0] => Array
(
[room_name] => name
[beds] => 2
[boards] => Array
(
[board_id] => 1
[price] =>200.00
)
)
)
)
)
How can I get board_id and price I have tried few foreach loops but can't get the result
foreach($hotels as $row)
{
foreach($row as $k)
{
foreach($k as $l)
{
echo $l['board_id'];
echo $l['price'];
}
}
}
This code didn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…