PHP - File Handling
Identify the error in this PHP code snippet:
$json = '{"a":1, "b":2}';
$arr = json_decode($json);
echo $arr['a'];$json = '{"a":1, "b":2}';
$arr = json_decode($json);
echo $arr['a'];[] causes error; use -> for objects.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions