If you are getting a json response decode it by using this code…..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?php $jsonData = file_get_contents('http://www.mywebsite.com/vehicle_lookup.php?reg=B734B5t'); $jsonData = strstr($jsonData, '{'); $phpArray = json_decode($jsonData); print_r($phpArray); foreach ($phpArray as $key => $value) { echo "<p>$key | $value</p>"; } ?> |