Hello guys i want to know how can i iterate this array.
stdClass Object
(
[new_occ] => Array
(
[0] => Array # This is the room number
(
[adults] => 2
[children] => Array
(
[0] => 0
[1] => 0
[2] => 0
)
)
[1] => Array
(
[adults] => 1
)
[2] => Array
(
[adults] => 2
[children] => Array
(
[0] => 1
[1] => 1
[2] => 1
)
)
)
)
i want to print each of the elements but for adults and children, i only want the sum of the elements for each room.
Thanks in advance.