2
I have the following object:
$a = new stdClass;
$a->id = 1;
$a->nome = 'wallace';
$a->parentes = new stdClass;
$a->parentes->pai = 'Sidney';
$a->parentes->mae = 'Maria';
I know with a cast
it is possible to convert the stdClass
for array
, but not recursively.
So how can I convert this object to array recursively?
See also: http://stackoverflow.com/a/16023589
– bfavaretto
That one is tricky huh, @bfavaretto
– Wallace Maxters