I have a script where the user can add news, but the problem is, even though there are breaks int he content (from hitting enter/return) when I echo the content, the line break is not displayed.
I'm guessing I need to replace line breaks with the actual line break code (<br>). but how do I replace something invisible like the return key?
There is a thread on this very topic from earlier today:
ooops! I should have searched, I just assumed no one else would have such crazy problems as I do. hehe. thanks much.
BTW here is the code I used if anyone else needs is.
str_replace(Chr(13), "<br>", $test);
There actually is a built in PHP function for that:
$newLine = nl2br ( $oldLine);
echo nl2br ( $line );
NL 2 BR => NewLine 2(to) <BR>