when i tried with var_dump(has_arrived) it returned the output as false.but i want the output as,
when the has_arrived status is true it should display the arrived text message instead else it will display the not arrived message in the foreach loop .
Kindly help me to suggest the idea and help me to solve the issue
JSON Response:
Code: Select all
{
"route": [
{
"no": 1,
"station": "CDG",
"has_arrived": false,
"has_departed": true,
"day": 0,
"distance": 0,
"scharr": "Source",
"schdep": "12:00",
"actarr": "00:00",
"actdep": "12:00",
"scharr_date": "19 Nov 2015",
"actarr_date": "19 Nov 2015",
"latemin": 0
}
{
"no": 2,
"station": "UMB",
"has_arrived": true,
"has_departed": true,
"day": 0,
"distance": 67,
"scharr": "12:40",
"schdep": "12:42",
"actarr": "12:40",
"actdep": "12:42",
"scharr_date": "19 Nov 2015",
"actarr_date": "19 Nov 2015",
"latemin": 0
}
]
}