title: using a php file instead of a json file for a d3 visualization
body: <p>Sorry sorry sorry for the basic question but I've been stuck on this for a while and I am not sure what is up. </p>
  
  <p>So I have a php file and a json file. When I run the php file on the terminal</p>
  
  <pre><code>php myFile.php
  </code></pre>
  
  <p>the output is identical to my json file. </p>
  
  <p>the output looks like this: </p>
  
  <pre><code>[{"word":"now","score":"16","sentence":" Now, at the least calcu- lation, 
  this broken vase dates back two thousand five hundred years "}]
  </code></pre>
  
  <p>(the Json file also looks like the above)</p>
  
  <p>When I pass in the json file to d3.json, I am able to see the visualization and all of it's data no-problem. But for some reason, when I replace the json file with the php file I am getting the error </p>
  
  <pre><code>Cannot read property 'length' of undefined
  at Object.a [as extent]
  </code></pre>
  
  <p>so I am never getting or displaying the data. I've made sure that the php file is in the same directory, no typos etc. And I've checked the echo for any differences but there are none. </p>
  
  <p>Thank you for your time! </p>
  
  <p>my js looks like this:</p>
  
  <pre><code>//can replace myFile.php with json file and it works!
  d3.json('myFile.php', 
  function (error,myData) {
  // a bunch of stuff})
  </code></pre>
  
  <p>Thank you!</p>