The examples I checked seems simple but I can't figure it out what I'm doing wrong. I'm trying to convert and display JSON text as object array in PHP.
$json = '{"color1":red, "color2":blue, "color3":yellow}';
$arr= json_decode($json, true);
print_r($arr);
It doesn't output anything. but when I print $json, the output is just fine