View Single Post
Old 08-24-2004, 05:27 PM   #5 (permalink)
SinisterMotives
Junkie
 
I find that nl2br() doesn't convert Windows' \r\n endline sequence in POST data to an HTML <br> tag on some systems. Maybe it's because they have older PHP versions. If this happens to you, here's a workaround:

PHP Code:

  
function format_text($str) {
   
$out str_replace("\r\n",'<br>',$str);
   
$out str_replace("\n",'<br>',$out);
   return 
$out;
  } 
// end function format_text 
SinisterMotives is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40