Reverse nl2br() – line breaks to new lines

function br2nl($string){
  return preg_replace('#<br\s*/?>#i', "\n", $string);
}

Leave a Reply

Your email address will not be published.