title: PHP file_put_contents new line issue
body: <p>I'm unable to write array to text file in new lines. My code:</p>
  
  <pre><code>echo '&lt;pre&gt;';
  print_r($final_result);
  echo '&lt;/pre&gt;';
  </code></pre>
  
  <p><strong>Output</strong>:</p>
  
  <pre><code>Array
  
  (
      [0] =&gt; Something1
      [1] =&gt; Something2
      [2] =&gt; Something3
  )
  </code></pre>
  
  <p><strong>Then</strong>:</p>
  
  <pre><code>file_put_contents($file, trim($final_result . "\n"), FILE_APPEND);
  </code></pre>
  
  <p><strong>Output</strong>:</p>
  
  <pre><code>Something1Something2Something3Array
  </code></pre>
  
  <p><strong>My goal is</strong>:</p>
  
  <pre><code>Something1
  Something2
  Something3
  </code></pre>
  
  <p>Any ideas? :)</p>