title: fgets read file and store into a variable
body: <p>I have Multiple URL in <code>result.txt</code> file. I want to use first URL with fgets.</p>
  
  <p>Problem is that fgets not passing value to <code>file_get_html</code> for next process.</p>
  
  <pre><code>$file = fopen("result.txt","r");
  $link = fgets($file);
  // echo fgets($file);       // Here I get URL successfully 
  
  $html = file_get_html($link);   // Problem, Not receiving URL
  
  foreach($html-&gt;find('.singcont a') as $a) {
      $links = $a-&gt;href;
      echo $links;
  }
  </code></pre>
  
  <p>How to pass <code>$link</code> value to <code>file_get_html</code> ?</p>
  
  <blockquote>
    <p>If I use this way it works <code>$html = file_get_html('http://example.com/');</code></p>
  </blockquote>