Question about Arrays and Objects

I’m working on something with the Google Search API. I’ve retrieved the results of my search (‘ipad 2 announcement’ in this case), put them through the JSON decoder, and now the results are in the form of an array of objects, within an object, within another object. All I want to know is, how would I go about printing the [url]s?

[php]stdClass Object
(
[responseData] => stdClass Object
(
[results] => Array
(
[0] => stdClass Object
(
[GsearchResultClass] => GwebSearch
[unescapedUrl] => http://bits.blogs.nytimes.com/2011/03/02/live-blogging-the-ipad-2-announcement/
[url] => http://bits.blogs.nytimes.com/2011/03/02/live-blogging-the-ipad-2-announcement/
[visibleUrl] => bits.blogs.nytimes.com
[cacheUrl] => http://www.google.com/search?q=cache:nahqtBl04CkJ:bits.blogs.nytimes.com
[title] => Live Blogging the iPad 2 Announcement - NYTimes.com
[titleNoFormatting] => Live Blogging the iPad 2 Announcement - NYTimes.com
[content] => Mar 2, 2011 Apple unveiled a new version of the iPad on Wednesday in San Francisco.
)

                [1] => stdClass Object
                    (
                        [GsearchResultClass] => GwebSearch
                        [unescapedUrl] => http://techcrunch.com/2011/03/02/ipad-2-announcement/
                        [url] => http://techcrunch.com/2011/03/02/ipad-2-announcement/
                        [visibleUrl] => techcrunch.com
                        [cacheUrl] => http://www.google.com/search?q=cache:xR2TdOV4uVQJ:techcrunch.com
                        [title] => What The <b>iPad 2 Announcement</b> Needs In Order To Be Bi-Winning
                        [titleNoFormatting] => What The iPad 2 Announcement Needs In Order To Be Bi-Winning
                        [content] => Mar 2, 2011 <b>...</b> We&#38;#39;re now just hours away from the unveiling of Apple&#38;#39;s next big thing at an   event in San Francisco. And while Apple hasn&#38;#39;t officially <b>...</b> 
                    )

                [2] => stdClass Object
                    (
                        [GsearchResultClass] => GwebSearch
                        [unescapedUrl] => http://www.pcworld.com/article/219212/why_no_ipad_2_announcement_yet.html
                        [url] => http://www.pcworld.com/article/219212/why_no_ipad_2_announcement_yet.html
                        [visibleUrl] => www.pcworld.com
                        [cacheUrl] => http://www.google.com/search?q=cache:sO9xI813Mi8J:www.pcworld.com
                        [title] => Why No <b>iPad 2 Announcement</b> Yet? - PCWorld
                        [titleNoFormatting] => Why No iPad 2 Announcement Yet? - PCWorld
                        [content] => Feb 9, 2011 <b>...</b> Rumors about the <b>iPad 2</b> are still just rumors -- why?
                    )

                [3] => stdClass Object
                    (
                        [GsearchResultClass] => GwebSearch
                        [unescapedUrl] => http://www.businessinsider.com/ipad-2-event-march-2011-2
                        [url] => http://www.businessinsider.com/ipad-2-event-march-2011-2
                        [visibleUrl] => www.businessinsider.com
                        [cacheUrl] => http://www.google.com/search?q=cache:kGbJwLgKGhEJ:www.businessinsider.com
                        [title] => <b>iPad 2 Announcement</b> Might Not Happen Until March
                        [titleNoFormatting] => iPad 2 Announcement Might Not Happen Until March
                        [content] => Feb 7, 2011 <b>...</b> Seems more likely than our &quot;within <b>2</b> weeks&quot; schedule speculation from last week.
                    )

            )[/php]

(There is a little more afterwards, but this is the part relevant to what I want.)

Thanks in advance,

Tom

Sponsor our Newsletter | Privacy Policy | Terms of Service