If print_r($object)
returns
stdClass Object
(
[*] => sometext
)
How do I get the property of the asterisk, i.e $object->*
?
You can access the property like this
$object->{"*"}
Does this work;
print_r($object->{'*'});
Just
print_r($object->{"*"});
You can also convert your object to an array :
$array = get_object_vars($object);
echo $array['*'];
But answers above are even better :
$object->{"*"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With