<?php
$string = '{"ClientData":[{"firstName":"Master","lastName":"Tester","email":"me@me.com","dob":"1973-01-22","age":"51","pierceType":"Vici","street":"number of house","city":"here","county":"there","postcode":"everywhere"}],"HealthData":[["condtion : Prone to Fainting / Dizziness","condtion : Allergic Response to Plasters","condtion : Prone to Fainting / Dizziness"]],"PiercerData":[{"firstName":"Male","lastName":"checking","pierceDate":"2013-02-25","jewelleryType":"Vici","jewelleryDesign":"Vidi","jewellerySize":"Vici","idChecked":null,"medicalChecked":null,"notes":"This is for more info"}]}';
$json = $string);
foreach($json AS $array) {
foreach($array AS $key => $value) {
echo $key . " : " . $value . "\n";
}
}
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.26
- Parse error: syntax error, unexpected ')' in /in/2LDL4 on line 4
Process exited with code 255.
preferences:
182.55 ms | 1395 KiB | 63 Q