Revision: 34648
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 26, 2010 15:20 by jmiller
Initial Code
function nls2p($str) { $str = str_replace('<p></p>', '', '<p>' . preg_replace('#([ ]\s*?[ ]){2,}#', '</p><p>', $str) . '</p>'); return $str; }
Initial URL
Initial Description
Turns /n to <br> and /n/n to </p><p> Usage: echo stripslashes(nl2br(nls2p($text)));
Initial Title
Convert new lines to paragraphs
Initial Tags
format
Initial Language
PHP