Dynamic Javascript File newline & carriage return
<p>I am building a JS page dynamically with php using .htaccss to make .php into .js</p>

<p>All works well apart from the output of the JS.</p>

<p>IE</p>

<pre><code>$data = array('one', 'two');

foreach($data as $d){
    echo "document.write('This is a test for array item ".$d."'); \r\n";
}
</code></pre>

<p>Problem is it outputs it all on one line ie</p>

<pre><code>document.write('This is a test for array one');document.write('This is a test for array two');
</code></pre>

<p>No matter what I have tried I cant get it over 2 lines.</p>

<p>Any ideas ?</p>
