Ok I have a text file and the data looks something like this:
1||<br>FAN<br><br>||some data||and so on
It displays fine when I read out of the file but when I have it read into a form so that the data can be edited it is triming off the Breaks infront of the text but the Breaks after the text remain.
Here's the code I'm using.
$Data[$K][1] = stripslashes($Data[$K][1]);
$Data[$K][1]= str_replace("<br>", "\n", $Data[$K][1]);
echo '<td width='.$c1_width.'><textarea style="width: '.$c1_width.'px;" name="tow'.$K.'">'.$Data[$K][1].'</textarea></td>';
echo '<td >';
Shouldn't str_replace treat them all the same? I don't understand why the Break infront of FAN is lost while the others remain.
I have also tried preg_replace, with the same results.