So I pass a PHP stdClass() object to Smarty, which looks like this, for example :
stdClass Object
(
[1] => stdClass Object
(
[id] => 1
[children] => stdClass Object
(
[4123] => stdClass Object
(
[id] => 4123
[children] => stdClass Object
(
[221] => stdClass Object
(
[id] => 221
[children] => stdClass Object
(
)
),
[55] => stdClass Object
(
[id] => 55
[children] => stdClass Object
(
)
)
)
),
[666] => stdClass Object
(
[id] => 666
[children] => stdClass Object
(
)
)
)
)
)
Each object has an id and children, which have the same structure.
How can I output all the id-s recursively like the this: 1, 4123, 221, 55, 666
using Smarty ?