how can i replace a carriace return with a <br> and make the sting a single line before writing it to the file?
$fh = fopen($Gbookfile, "a");
$string = str_replace("\n", "<br>", $comment);
fwrite($fh, $string);
that does half the job of replacing the carriage return but when it write it to the file it enters it like so:
:confused::cool::cry::happy::grin::drool::mad::sad::sleepy::tongue::suprised::smile:
<br>
<br>
<br>TESTING JS
<br>TESTING JSTESTING JSTESTING JS
<br>
<br>TESTING JSTESTING JS
<br>
<br>
<br>
<br>TESTING JS
<br>
<br>TESTING JSTESTING JS
<br>TESTING JS
whereas i want it in one line like so for the sake of tidiness in my file?:
:confused::cool::cry::happy::grin::drool::mad::sad::sleepy::tongue::suprised::smile:<br><br><br>TESTING JS<br>TESTING JSTESTING JSTESTING JS<br><br>TESTING JSTESTING JS<br><br><br><br>TESTING JS<br><br>TESTING JSTESTING JS<br>TESTING JS
Thanks in advance.