There are xml:
<planeta-kino> <movies>...</movies> <showtimes> <day date="2017-03-04"> <show full-date="2017-03-04 17:20:00" /> <show full-date="2017-03-04 21:45:00" /> <show full-date="2017-03-04 10:30:00" /> ... <day date="2017-03-05"> <show full-date="2017-03-05 17:20:00" /> <show full-date="2017-03-05 21:45:00" /> <show full-date="2017-03-05 10:30:00" /> ... итд
I use 2 cycles to go over all <day> and all <show> nested
foreach ($data->showtimes->day as $day){ foreach ($data->showtimes->day->show as $show){ echo $show['full-date']."<br>"; } }
But I always get the result only on the first block <day> <show>
2017-03-04 17:20:00
2017-03-04 21:45:00
2017-03-04 10:30:00
2017-03-04 17:20:00
2017-03-04 21:45:00
2017-03-04 10:30:00
... etc
those. always for 2017-03-04 number and how can I not get to the 2nd block <show>. What's wrong with my cycle, tell me?