note 10065 deleted from function.nl2br by aidan

From: Date: Sun, 10 Oct 2004 10:40:09 +0000
Subject: note 10065 deleted from function.nl2br by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78292@lists.php.net to get a copy of this message
Note Submitter: eightraks at linux-foo dot com ---- [Editor's Note: Each major operating system uses a different character or set of characters to indicate the end of a line. Macintosh: \r Unix : \n Windows : \r\n The code below allows the line endings to be easily replaced with a br tag on any of the three major OSs. -zak@php.net] Well, there's some major issues with NewLine codes vs OS (win, linux, mac). Here is what I use : $s_data = ereg_replace("(\r\n|\n|\r)", "<br />", $s_data); So far it worked great for me. Greets, EiGHTRAKS

« previous php.notes (#78292) next »