View Single Post
Old 08-22-2006, 12:58 PM  
Nookster
Confirmed IT Professional
 
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
Quote:
Originally Posted by munki
I think this is what you are looking for, or at least close.

http://us2.php.net/manual/en/function.nl2br.php
Actually he's looking to do the opposite. Here's a bit of code I found years ago that does the trick if you need to convert <br> tags to the newline char...
Code:
function br2nl($text) {
   $text = str_replace("<br />","",$text);
   $text = str_replace("<br>","",$text);
   return $text;
}
Nookster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote