In php, how do I load txt file as a string?

Kyu

New Member
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\[code\]$string = **WITHIN TEXT FILE "[email protected] MIME-Version: bla bla bla [email protected]";$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\]How do I load the text from the text file into the string variable?Thanks in advance!
 
Back
Top