Im trying to get the Vin part from the JSON array.
{
"results": [
{
"vehicle": {
"ownershipCondition": "Used",
"registration": "BX68NHL",
"vin": "ZFA3120000JA60541",
"make": "Fiat",
"model": "500",
"generation": "Hatchback (2015 - )"
}
}
]
}
I have tried using this but it doesnt work. Can anyone help.
foreach($result['results'] as $res)
{
$currCar = $res['vehicle']['vin'];
echo $currCar."\n";
}