I got an object (in PHP) and I can’t print the content.
In debug-mode it’s like this:
stdClass Object
(
[pre-selection] => 1
)
But I can’t print the ‘pre-selection’ because of the minus sign.
echo $object->pre-selection; //doens't work.
How can I print this out? Thanks.
You could try
http://php.net/manual/en/language.types.string.php#language.types.string.parsing.complex
See also Example 2 of
json_decode()Update (thanks to salathe):