title: How do I extract values from the iTunes Search API JSON page with PHP?
body: <p>I am creating a website which is going to require up-to-date iPhone App prices, such as on appshopper, and thanks to <strong>gbc</strong> here on stackoverflow I was directed towards using the iTunes Search API.  I am somewhat familiar with PHP though I don't practice it that often and am not familiar with the use of JSON or how to extract values from it.  I tried to use the tutorial here: <a href="http://webhole.net/2009/11/28/how-to-read-json-with-javascript/" rel="nofollow">http://webhole.net/2009/11/28/how-to-read-json-with-javascript/</a> to get it to work, though I had no luck, no data was pulled and I am not skilled enough to figure it out.  I have also attempted numerous other tutorials, though the one above seemed to fit the closest to what I needed.  This is going to be a necessary portion of the site, though it is not the key component of the site, so it doesn't need to be very robust, it just needs to work.  I would appreciate any help, suggestions, or links.</p>
  
  <p>Here is the code that I tried to use, I'm not sure if this is incapable of doing what I want it to or if I made some small error that I'm not sure of because I just followed a tutorial and don't know what I am doing.</p>
  
  <pre><code>&lt;input type="text" id="query" /&gt;&lt;button&gt;search&lt;/button&gt;&lt;br /&gt;
  &lt;div id="results"&gt;
  
  &lt;/div&gt;
  
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  var url='http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/wa/wsLookup?id=';
  var query;
   $('button').click(function(){
    query=$("#query").val();
    $.getJSON(url+query,function(json){
     $.each(json.results,function(i,app){
        $("#results").append('&lt;p&gt;'+app.trackName+'&lt;/p&gt;');
     });
    });
   });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you, I really appreciate any help that anyone can provide.</p>