<?php
$string = '[{
"errorcode": "0",
"xml": {
"seat-map": {
"lower-deck": {
"column": [
{
"$": {
"id": "1"
},
"row": [
{
"$": {
"id": "1"
},
"seat": {
"$": {
"number": "3",
"status": "0"
}
}
},
{
"$": {
"id": "2"
},
"seat": {
"$": {
"number": "6",
"status": "0"
}
}
},
{
"$": {
"id": "3"
},
"seat": {
"$": {
"number": "9",
"status": "0"
}
}
},
{
"$": {
"id": "4"
},
"seat": {
"$": {
"number": "12",
"status": "0"
}
}
},
{
"$": {
"id": "5"
},
"seat": {
"$": {
"number": "15",
"status": "0"
}
}
},
{
"$": {
"id": "6"
},
"seat": {
"$": {
"number": "18",
"status": "0"
}
}
},
{
"$": {
"id": "7"
},
"seat": {
"$": {
"number": "21",
"status": "0"
}
}
},
{
"$": {
"id": "8"
},
"seat": {
"$": {
"number": "24",
"status": "0"
}
}
},
{
"$": {
"id": "9"
},
"seat": {
"$": {
"number": "27",
"status": "0"
}
}
},
{
"$": {
"id": "10"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "11"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "12"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
}
]
},
{
"$": {
"id": "2"
},
"row": [
{
"$": {
"id": "1"
},
"seat": {
"$": {
"number": "2",
"status": "0"
}
}
},
{
"$": {
"id": "2"
},
"seat": {
"$": {
"number": "5",
"status": "0"
}
}
},
{
"$": {
"id": "3"
},
"seat": {
"$": {
"number": "8",
"status": "0"
}
}
},
{
"$": {
"id": "4"
},
"seat": {
"$": {
"number": "11",
"status": "0"
}
}
},
{
"$": {
"id": "5"
},
"seat": {
"$": {
"number": "14",
"status": "0"
}
}
},
{
"$": {
"id": "6"
},
"seat": {
"$": {
"number": "17",
"status": "0"
}
}
},
{
"$": {
"id": "7"
},
"seat": {
"$": {
"number": "20",
"status": "0"
}
}
},
{
"$": {
"id": "8"
},
"seat": {
"$": {
"number": "23",
"status": "0"
}
}
},
{
"$": {
"id": "9"
},
"seat": {
"$": {
"number": "26",
"status": "0"
}
}
},
{
"$": {
"id": "10"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "11"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "12"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
}
]
},
{
"$": {
"id": "3"
},
"row": [
{
"$": {
"id": "1"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "2"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "3"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "4"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "5"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "6"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "7"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "8"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "9"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "10"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "11"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "12"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
}
]
},
{
"$": {
"id": "4"
},
"row": [
{
"$": {
"id": "1"
},
"seat": {
"$": {
"number": "1",
"status": "0"
}
}
},
{
"$": {
"id": "2"
},
"seat": {
"$": {
"number": "4",
"status": "0"
}
}
},
{
"$": {
"id": "3"
},
"seat": {
"$": {
"number": "7",
"status": "0"
}
}
},
{
"$": {
"id": "4"
},
"seat": {
"$": {
"number": "10",
"status": "0"
}
}
},
{
"$": {
"id": "5"
},
"seat": {
"$": {
"number": "13",
"status": "0"
}
}
},
{
"$": {
"id": "6"
},
"seat": {
"$": {
"number": "16",
"status": "0"
}
}
},
{
"$": {
"id": "7"
},
"seat": {
"$": {
"number": "19",
"status": "0"
}
}
},
{
"$": {
"id": "8"
},
"seat": {
"$": {
"number": "22",
"status": "0"
}
}
},
{
"$": {
"id": "9"
},
"seat": {
"$": {
"number": "25",
"status": "0"
}
}
},
{
"$": {
"id": "10"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "11"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
},
{
"$": {
"id": "12"
},
"seat": {
"$": {
"number": "#",
"status": "blank"
}
}
}
]
}
]
}
}
}
}]';
$json = json_decode($string, true);
foreach($json AS $array) {
foreach($array AS $key => $value) {
echo $key . " : " . $value . "\n";
}
}
- Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- errorcode : 0
Warning: Array to string conversion in /in/57Yoe on line 574
xml : Array
- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.31, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
- errorcode : 0
Notice: Array to string conversion in /in/57Yoe on line 574
xml : Array
- Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 7.3.32 - 7.3.33, 7.4.26
- errorcode : 0
xml : Array
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
- Fatal error: Call to undefined function json_decode() in /in/57Yoe on line 570
Process exited with code 255. - Output for 4.4.5 - 4.4.9
- Fatal error: Call to undefined function: json_decode() in /in/57Yoe on line 570
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
- Fatal error: Call to undefined function: json_decode() in /in/57Yoe on line 570
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Call to undefined function: json_decode() in /in/57Yoe on line 570
preferences:
229.72 ms | 401 KiB | 315 Q