title: In php, how do I load txt file as a string?
body: <p>I have a text file that contains paragraphs of text.  I want to load it as a string in php, and then collect all the e-mail addresses within it as an array.  However, how do I initially load the text file contents as the string?  Restated, I have</p>
  
  <pre><code>$string = **WITHIN TEXT FILE "user@domain.com MIME-Version: bla bla bla user2@example.com";
  $matches = array();
  $pattern = '/[A-Za-z0-9_-]+@[A-Za-z0-9_-]+\.([A-Za-z0-9_-][A-Za-z0-9_]+)/'
  preg_match($pattern, $string, $matches);
  </code></pre>
  
  <p>How do I load the text from the text file into the string variable?</p>
  
  <p>Thanks in advance!</p>