Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP]Line-Breaking in DB.

Joined
Jul 26, 2006
Messages
3,634
Reaction score
1,007
On RZ, if you end a line with the enter key while posting, it'll automatically make a <br /> of it.
How do they does vB do that?
I've tried nl2br but that requires the use of '\n' anyway.

Thanks,

~Elite.
 
duck you, I'm a dragon
Loyal Member
Joined
Apr 29, 2005
Messages
6,407
Reaction score
130
$str = preg_replace("/\n/", "<br/>", $str);
 
Experienced Elementalist
Joined
Apr 7, 2005
Messages
254
Reaction score
0
$str = nl2br($str);

Pieman, your evil ideas kills me.
 
Custom Title Activated
Loyal Member
Joined
Jun 28, 2007
Messages
2,986
Reaction score
3
Yep, should do the same. And yes, the browser inserts a \n character for each new line.
 
Back
Top