
After that I use the json_decode() function to convert the data into a searchable format:

NOTE: One nice trick that I learned is to do a var_dump() of the data variable to your output destination. What this does is essentially show you the structure of the JSON response so that you can see the hierarchy of tags. This is similar to just putting your XML URL into firefox in order to see the layout. To do this I use the following snippet of code:

The output will look like this:

After that it is just a matter of figuring out which items you want to retrieve and then grabbing that information. Yelp puts everything under the heading of businesses, which means that I use the following code to access the elements:

So here is the output on the site:
