Hi All
I am building a JS page dynamically with php using .htaccss to make .php into .js
All works well apart from the output of the JS.
IE
$data = array('one', 'two');
foreach($data as $d){
echo "document.write('This is a test for array item ".$d."'); \r\n";
}
Problem is it outputs it all on one line ie
document.write('This is a test for array one');document.write('This is a test for array two');
No matter what I have tried I cant get it over 2 lines.
Any ideas ?