I've JSON decoded a result from the CNET API and got the following (after var_dump()):
object(stdClass)#4 (35) {
["Summary"]=> object(stdClass)#5 (1) {
["$"]=> string(89) "Record keystrokes, visited web sites, and screenshots of all PC
activity in stealth mode."
}
["Requirements"]=> object(stdClass)#6 (0) {}
["CNETContentIds"]=> object(stdClass)#7 (0) { }
["CleverBridgeUrl"]=> object(stdClass)#8 (0) { }
["BuyNowUrl"]=> object(stdClass)#9 (1) {
["@type"]=> string(0) ""
}
...
How do I access that 89-character string in the variable named "$"?
I've tried this:
$object->Summary->$
But my editor gave me an error.
I know, from trial and error that you can just string '->'s together to access nested objects, but it's so strange that a member is named $?
Even escaping the $ doesn't work:
$object->Summary->\$