Skip to content

Instantly share code, notes, and snippets.

@mtttmpl
Last active December 13, 2015 16:58
Show Gist options
  • Save mtttmpl/4943843 to your computer and use it in GitHub Desktop.
Save mtttmpl/4943843 to your computer and use it in GitHub Desktop.
Convert <br> tags to new lines
<?php
function br2nl($string) {
return preg_replace('=<br */?>=i', "\n", $string);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment