/ Published in: PHP

Turns /n to and /n/n to </p><p>
Usage:
echo stripslashes(nl2br(nls2p($text)));
Usage:
echo stripslashes(nl2br(nls2p($text)));
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function nls2p($str) { ]\s*?[ ]){2,}#', '</p><p>', $str) . '</p>'); return $str; }
Comments
