Question from the PHP - Fundamentals test

How to get the value of a key in a JSON object in PHP

Medium

What is the output of the following code ?

$jsonobj = '{"Peter":35,"Ben":37,"Joe":43}';
$arr = json_decode($jsonobj, true);
print $arr->Ben;
Author: ThéoStatus: PublishedQuestion passed 516 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!