PHP br2nl function

PHP CODE

5 comments:

blendaz said...

Thanks!
Really helps me a lot :P

Jon said...

Simple and useful!

Anonymous said...

Really good!

Anonymous said...

i thought this was supposed to be line break to new line, not line break to nothing.

Anonymous said...

If you write it out as
function br2nl($text) {
return preg_replace('//i', '
', $text);
}

e.g. leave put a new line in your code between the two '' then it works as you're expecting.
Thanks a lot