I have a thing for editing my pages that I made with php...But Every time I want a line break I don't want to have to type <br> so what would I use to replace a linebreak with a <br>?
This forum does it :p
Oink
I don't like to use str_replace, and I don't know why. It's just a habit. Here's how I'd do it:
$string = preg_replace("/\n/","<br>",$string);
Voila.
that's not needed when you can use [man]nl2br[/man]
Sweet it worked 🙂
Thanks