File Get and put contents to Text file with new line
<p>I have two files</p>

<p>File1.php and File2.php</p>

<pre><code>$hello = file_get_contents("file1.php");
file_put_contents("hello.txt",$hello);
</code></pre>

<p>file1.php contains some example texts like below</p>

<pre><code>hello \r\n hi \r\n how are you.
</code></pre>

<p>What i need is when I put contents to hello.txt , I want the words to appear in new line like below</p>

<pre><code>hello 
hi
how are you.
</code></pre>

<p>I tried to use \r\n and \n but nothing works</p>

<p><strong>Note:</strong> file1.php is the file_get_contents of another page source..i can only replace <code>&lt;br&gt;</code> tag with  <code>\r\n</code> and this is just an example. I have some other complex part to do.</p>
