Hi,
I'm trying to convert all <BR> tags in a line to a linebreak and I'm getting some weird results. Here's what I have.
@ $fp = fopen($loadfile,"r");
while (!feof($fp))
{
$loads = fgets($fp, 1000);
$addit = strip_tags($loads,'<br>');
$addit = preg_replace('<br>', chr(13), $addit);
fwrite($fp2,trim($addit));
}
fclose($fp);
When I run this it only replaces the br and leaves the < and >. If I try $addit = preg_replace('<br />', chr(13), $addit); then it doesn't do anything and leaves the <br> alone. Any ideas would be greatly appreciated.