Access object property with disallowed character in property name

This will work:

echo $object->feed->{'xmlns$media'};

Alternatively, you can tell json_decode to return an array:

$array = json_decode($json, true);
echo $array['feed']['xmlns$media'];

Leave a Comment