Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
object(FuncTest)) { ["name"]=> string(14) "Test" ["skill_tech"]=> object(Skill) { ["def"]=> string(1) "0" } }
我有这种对象,如何在 PHP 中转换为数组中的数组。
谢谢
use json_decode // The second parameter of json_decode forces parsing recursively an object into an associative array $array = json_decode(json_encode($object), true);