Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nl2br_limit($string, $num){
- return preg_replace('/\n/', '<br/>', preg_replace('/(\s{'.$num.'})\s+/','$1', $string));
- }
- http://stackoverflow.com/questions/3027277/php-nl2br-limit-x-amount
- http://stackoverflow.com/users/365047/kr1zmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement