I have some object like this :
object(stdClass)#188 (1) { ["0"]=> string(1) "1" }
How could I print that object value in php ?
Thank you.
I have some object like this :
object(stdClass)#188 (1) { ["0"]=> string(1) "1" }
How could I print that object value in php ?
Thank you.
Try this, Best way for single value
echo $objects->{"0"};
and for multiple values
foreach($objects as $val )
{
echo $val;
}
You have access to the internal content of the Object via: ->{"0"}
. Assuming you want to use the variable or echo it out for some reasons, you can simply do:
<?php echo $object->{"0"}; ?>