I have an array containing an object of a standard class. How to return properties (print them) in a stdClass object?
you can see them with var_dump($myObject);
var_dump($myObject);
If you just want to print, you can use var_dump()or print_r().
var_dump()
print_r()
var_dump($obj); print_r($obj);
If you want an array of all properties and their values ββto use get_object_vars().
get_object_vars()
$properties = get_object_vars($obj); print_r($properties);