Just use json_decode($json_string)

It returns an object by default, but there's a flag to make it return and 
array. Can't remember off the top of my head, buy chech on php.net for exact 
usage.

Its counterpart is json_encode

Sent from my iPod

On 27 Jan 2011, at 6:33, Patrick <kenned...@gmail.com> wrote:

> Does anyone have a simple JSON parser example in PHP?  I'm looking for
> something that's simple - perhaps a PHP include file that's a function
> or two, where you can pass in the JSON data and get it parsed and
> returned as an array to the calling program.  I'm beginning to write
> my own, but I figured seeing an example of a slightly better one might
> get me going quicker and better.  Obviously, I can tweak it from
> there.  Thanks in advance for any input.
> 
> -- 
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group: 
> http://groups.google.com/group/twitter-development-talk

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to