title: Simple JSON examples don't work. PHP, JQuery-Mobile
body: <p>My friend has this embarassing problem. He's trying to get the most basic of JSON examples to work, and he's having no luck whatsoever. When referencing JSON sources in the same folder it doesn't work, but when getting Twitter or Flickr data it has no problem.</p>
  
  <p>I could give you a dozen examples of ones that aren't working, but here's one:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"&gt;
  &lt;meta name="apple-mobile-web-app-capable" content="yes"&gt;
  &lt;meta name="apple-mobile-web-app-status-bar-style" content="black"&gt;
  &lt;title&gt;json demo: simple&lt;/title&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;   &lt;/script&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $.getJSON('json.php', function(data) {
      $('.result').html('&lt;p&gt;' + data.foo + '&lt;/p&gt;' + '&lt;p&gt;' + data.baz[1] + '&lt;/p&gt;');
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="result"&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The output from json.php is:</p>
  
  <pre><code>{
    "foo": "The quick brown fox jumps over the lazy dog.",
    "bar": "ABCDEFG",
    "baz": [52, 97]
  }
  </code></pre>
  
  <p>This is an example taken off the web, and I've tried many more. Some don't use PHP but a static text file, none of which work.</p>
  
  <p>I'm embarassed to ask for help on something so basic... I mean he's embarassed...</p>