title: PHP explode function with file_get_contents?
body: <pre><code>   &lt;?php
  $str = "Hello world. It's a beautiful day.";
  print_r (explode(" ",$str));
  ?&gt;
  </code></pre>
  
  <p>The above code prints an array as an output.</p>
  
  <p>If I use </p>
  
  <pre><code>&lt;?php
  $homepage = file_get_contents('http://www.example.com/data.txt');
  print_r (explode(" ",$homepage));
      ?&gt;
  </code></pre>
  
  <p>However it does not display individual numbers in the text file in the form of an array.</p>
  
  <p>Ultimately I want to read numbers from a text file and print their frequency. The data.txt has 100,000 numbers. One number per line. </p>