using array_walk_recursive() for stdClass objects
问题 I have looked through a few answers on here but that don't seem to utilise this method? I have an array of items, and the items are objects. The object can have a key which is 'children' and 'children' is an array of objects etc. Is there a way to achieve this? Example: Array ( [1] => stdClass Object ( [id] => 1 [name] => Steve King [image] => upload/shop/fe7a66254e4249af2b0093efca75a914.jpg [parent] => 0 [children] => Array ( ) ) [2] => stdClass Object ( [id] => 2 [name] => Eden Hall [image]