<?php
//Assign JSON encoded string to a PHP variable
$age = '{"Poll":55,"Devid":40,"Akbar":68,"Cally":70}';
// Decode JSON data to PHP associative array
$arr = json_decode($age, true);
echo "Parsing data by using PHP Array <br/>";
// Access values from the associative array
echo $arr["Poll"]."<br/>";
echo $arr["Devid"]."<br/>";
echo $arr["Akbar"]."<br/>";
echo $arr["Cally"]."<br/>";
$obj = json_decode($age);
echo "Parsing data by using PHP Object <br/>";
// Access values from the returned object
echo $obj->Poll."<br/>";
echo $obj->Devid."<br/>";
echo $obj->Akbar."<br/>";
echo $obj->Cally."<br/>";
?>