Results 1 to 5 of 5
Sep 21, 2012, 16:45 #1
- Join Date
- Sep 2004
- Provo, UT
- 1 Post(s)
- 0 Thread(s)
Double results when using str_replace
I am confused why the following code returns two X’s between each paragraph. I was expecting only one.
$paragraphs = str_replace("\n", “X", $paragraphs);
So then I figured there must be two line breaks in the text coming from the database. But when I tried the following code, there was no X at all between each paragraph.
$paragraphs = str_replace(“\n\n", “X", $paragraphs);
I’m clearly not understanding about something regarding line breaks. If it makes any difference, I’m working on a Mac, and I think they handle line breaks differently than a PC.Convert your dollars into silver coins. www.convert2silver.com