Hi, I'm having a problem with this.... I'm writting a HTML file and the text appear all wraped o a single line and I need to write it on several lines. Here is the example :
I'm using this code:
$articulo1 = '<html><head><title></title></head><body>';
$articulo11 = '<script>';
$articulo2 = 'var targetURL="'.$articulo.'"';
$articulo3 = 'window.location=targetURL';
$articulo4 = '</script>';
$articulo44 = '</body></html>';
$newfile = fopen($link, 'w') or die("Can't create the file $tittle");
$data2 = ("$articulo1 $articulo11 $articulo2 $articulo3 $articulo4 $articulo44");
fwrite($newfile, $data2);
fclose($newfile);
The file is created but the text is written like this:
<html><head><title></title></head><body><script> var targetURL="link.html" window.location=targetURL </script></body></html>
And I need it to be written like this:
<html><head><title></title></head><body>
<script>
var targetURL="link.html"
window.location=targetURL
</script>
</body></html>
Well Thanks :rolleyes: