This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP and JSON

PHP - Accessing the Decoded Values

35, 37, 43

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

$arr = json_decode($jsonobj, true);

echo $arr["Peter"] . ", ";
echo $arr["Ben"] . ", ";
echo $arr["Joe"];
?>

N.B. I formatted the results by adding spaces and commas to separate each number object for easier understanding. Otherwise the result is a six digit integer.