demo_json_decode4.php:
<!DOCTYPE html> <html> <body> <?php $jsonobj = '{"Peter":35,"Ben":37,"Joe":43}'; $arr = json_decode($jsonobj, true); echo $arr["Peter"]; echo $arr["Ben"]; echo $arr["Joe"]; ?> </body> </html>