JSON decode to PHP with objects and arrays: HELP Needed !

Anyone an idea how to be able to get all the data and echo them in a webpage?

Under the ‘more’ tag is the example json, I can get the flights data echoed to html but I cannot get ie. the route-> destinations as well
There are some more arrays but I have no clue how to loop through flights, route, codeshares etc..

“flights”: [
“id”: 121384294328980280,
“flightName”: “EZY7011”,
“scheduleDate”: “2017-03-19”,
“flightDirection”: “A”,
“flightNumber”: 7011,
“prefixIATA”: “U2”,
“prefixICAO”: “EZY”,
“scheduleTime”: “20:50:00”,
“serviceType”: “J”,
“mainFlight”: “EZY7011”,
“codeshares”: null,
“estimatedLandingTime”: “2017-03-19T21:35:35.000+01:00”,
“actualLandingTime”: null,
“publicEstimatedOffBlockTime”: null,
“actualOffBlockTime”: null,
“publicFlightState”: {
“flightStates”: [
“route”: {
“destinations”: [
“terminal”: 4,
“gate”: null,
“baggageClaim”: {
“belts”: [
“expectedTimeOnBelt”: null,
“checkinAllocations”: null,
“transferPositions”: null,
“aircraftType”: {
“iatamain”: “320”,
“iatasub”: “32S”
“aircraftRegistration”: “GEZWG”,
“airlineCode”: 64,
“expectedTimeGateOpen”: null,
“expectedTimeBoarding”: null,
“expectedTimeGateClosing”: null,
“schemaVersion”: “3”


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.