I have an array that looks like this:
Array ( [today] => Array ( [0] => Array ( [hour] => 08/03/11 00:00)
[1] => Array ( [hour] => 08/03/11 11:00)
[n] => Array ( [hour] => 0xxxxxxxxx)
)
[yesterday] => Array ( [0] => Array ( [hour] => 08/02/11 00:00)
[1] => Array ( [hour] => 08/02/11 11:00)
[n] => Array ( [hour] => 0xxxxxxxxx)
)
)
And so on, with many hours for today, and many for yesterday.
Now, I’m a bit lost on how to get the same hour for today and yesterday inside a foreach. For example, I have:
foreach ($Array as $key => $data) {
//display today's hour
//display yesterday's hour value
How can I get the values for all of them, line by line?
1 Answer