Bạn đang xem: 7
When I chạy thử the array with print_r($result<0>), it turns out khổng lồ have embedded objects.
ABC Object (
I"m new to PHP, waiting for help!
Sounds like you want get_object_vars(), which will return an array of accessible properties.
class foo public $bar = "foo"; private $bor = "fizz";$properties = get_object_vars( new foo() );print_r( $properties );Which outputs:
Try using this to lớn figure out what the contents of those variables are:
This function return all the properties in a classfunction get_object_public_vars($object) return get_object_vars($object);
Thanks for contributing an answer to Stack Overflow!Please be sure to answer the question. Provide details & share your research!
But avoid …Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Post Your Answer Discard
site kiến thiết / hình ảnh © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. Rev2021.12.20.41044