GetDotted Domains

Viewing Thread:
"PHP: Matching and Replacing newlines"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 10/08/06 at 18:13
Regular
"Peace Respect Punk"
Posts: 8,069
Basically, I've got a string, and it has some newline characters in it, and I want to replace these with '
'. I've tried doing a str_replace() looking for '\n' and '\r\n', but to no avail, it doesn't do anything. I know there's the nl2br() function designed specifically for this purpose but I'm being awkward, and can't really see why my str_replace() isn't working...

I'm getting the string from a