Show Output
Access a Value of JSON Object in PHP
"; // Output: 65 echo $arr["Harry"] . "
"; // Output: 80 echo $arr["John"] . "
"; // Output: 78 echo $arr["Clark"] . "
"; // Output: 90 echo "
"; // Decode JSON data to PHP object $obj = json_decode($json); // Access values from the returned object echo $obj->Peter . "
"; // Output: 65 echo $obj->Harry . "
"; // Output: 80 echo $obj->John . "
"; // Output: 78 echo $obj->Clark . "
"; // Output: 90 ?>