Having problems getting the right data out of this multidimensional(?) array that I retrieve when using FirePHP to see what I’m working with:
array(
['day'] => 'Wed'
['is_used'] => 1
[0] =>
array(
['day'] =>
'Wed'
['title'] =>
'onsdag denna veckan 2'
['content'] =>
['price'] =>
)
[1] =>
array(
['day'] =>
'Wed'
['title'] =>
'onsdagslunchen'
['content'] =>
['price'] =>
123123
)
)
I want to use the 0, 1 array in the array if that makes any sense…? Or is this array broken?
When I try
foreach ($foo as $bar){
echo $bar
}
I’m getting 4 results, day, is_used and the 0, 1 arrays.
The code is returning the values correctly. It’s returning the first children of the
$fooarray, which are:dayandis_usedare strings, but because0and1are arrays, you’ll need to cycle through them again to get their values:That should echo out the following: