JSON Decode PHP

The json_decode() function is used to decode or convert a JSON object to a PHP object.

Example:

$jsonobj = '{"Peter":35,"Ben":37,"Joe":43}';

$obj = json_decode($jsonobj);

echo $obj->Peter;
echo $obj->Ben;
echo $obj->Joe;

Result:

353743
READ :  Buat MHCV di Codeigniter Versi 3.xx