Home >> Snippet List >> Snippet

Name
BR2NL Function - Opposite of NL2BR
Description
Simple way to do the opposite of what the nl2br() function does- turns breaks () into new lines
PHP Snippet
FUNCTION br2nl($string){
RETURN PREG_REPLACE('#<br\s*?/?>#i', "\n", $string); 
}