Hi all,
In the code below, I readout the content of a textfile wich was entered via a textfile with a "wrap" option. With the nl2br() command I readout the <br>'s so it will be displayed correctly.
My problem now is, when I don't hit a return in the textfile, the linebrake will be occure automatically (wrap option). How can i tell my textfile, that it recognizes these automatic linebrakes when I write it to my textfile.
<?PHP
//**************************************************
$NewsFile = "news_read.txt";
//**************************************************
$readout = file_get_contents ($NewsFile);
$countlet = strlen($readout);
for ($i=0; $i < $countlet; $i++)
if ($i % 35 == 0)
{
print "<br>";
}
print nl2br($readout[$i]);
}
?>:confused:
Thanx in advance
Olli