Answers for "how to avoid json decode error in php json_decode syntax"

PHP
19

php json_decode

$personJSON = '{"name":"Johny Carson","title":"CTO"}';

$person = json_decode($personJSON);

echo $person->name; // Johny Carson
Posted by: Guest on July-01-2019
0

php json decoding as string incorrectly

$personJSON = '{"name":"Johny Carson","title":"CTO"}';

$person = json_decode($personJSON);

echo $person->name; // Johny Carson
Posted by: Guest on November-20-2020

Browse Popular Code Answers by Language