xxxxxxxxxx
You have to use preg_replace for avoiding the null results from json_decode
here is the example code
$json_string = stripslashes(html_entity_decode($json_string));
$bookingdata = json_decode( preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $json_string), true );
xxxxxxxxxx
$personJSON = '{"name":"Johny Carson","title":"CTO"}';
$person = json_decode($personJSON);
echo $person->name; // Johny Carson
xxxxxxxxxx
<?php
$json = '{"firstName":"Peter","lastName:":"Silva","age":23}';
$personInfo = json_decode(json);
echo $personInfo->age;
?>