replacing "\n" with <br />
Posted 04 April 2006 - 08:14 PM
$message = str_replace('\n','<br />',$row['message']);
1) why isn't that working?
2) are line breaks specific to the server they're submitted to or the browser they're submitted from? For example, if it's server specific and on a unix server i'm guessing "\n" is correct, but if it's client/browser specific then i'd have to escape "^m" for mac "\n" for unix, "\r\n" for windows etc. right?
Anyone up for bringing this down to my level?
Posted 04 April 2006 - 08:31 PM
Have you tried this yet:
$something = nl2br($something);[/quote]
didn't even know about that one...duh...thanks, that should work perfectly.
Posted 04 April 2006 - 09:56 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users