Thursday, September 23, 2010

multi-dimensional stdClass Object

Programmer Question

I've got a rather large multidimensional stdClass Object being outputted from a json feed with PHP.



It goes about 8 or 9 steps deep and the data that I need is around 7 steps in.



I'm wondering if I can easily grab one of the entires instead of doing this:



echo $data->one->two->anotherone->gettinglong->omg->hereweare;



I'm saying this because the data structure may change over time.



Is this possible?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails