title: Converting a txt file to string, then to array and then printing each word of the array
body: <p>I am trying to convert a text file into a string, then into an array and then finaly print each of the values (words) into separate 'a' holders.</p>
  
  <p>The .txt file contains one line of text.</p>
  
  <p>I have tried it through a for loop, like so:</p>
  
  <pre><code>    $lines = file_get_contents('test.txt', FILE_USE_INCLUDE_PATH);
      $words = explode(" ", $lines);
  
      for ($x = 1; $x &gt;= 100; $x++){
          print '&lt;a id="word$x"&gt;'$words[$x]'&lt;/a&gt;';
      }
  </code></pre>
  
  <p>But that doesnt work. I am sure that I am just missing something basic, but I have tried and failed so many times, that I need others opinions and advice.</p>