Hello,
I have a text window where I cut and paste a paragraph of text from Word into; I use the following command to convert to <br> so I can display the paragraph on the screen for a preview:
$newsletter = str_replace("\n", "<br>", $newsletter); // to store the string
I then store the converted string into my database.
At some point later I retrieve the data so I can e-mail it to my client, I use the following command to replace the <br> with \n:
$newsletter = str_replace("<br>", "\n", $newsletter); // to retrieve it.
The problem is, it's double spacing the output. I want the e-mailed output to look like the displayed output, single spaced.
Why is this happening? Any thoughts?
Thanks very much, Gary
Displayed Output:
[ 2 ] Art / Culture | Online Stores
[ 1 ] Automobiles / Motorcycles | Online Stores | General Products
[ 1 ] Automobiles / Motorcycles | Online Stores | Parts / Accessories
[ 1 ] Beverages | Coffee | Brands
E-mail Output:
[ 2 ] Art / Culture | Online Stores
[ 1 ] Automobiles / Motorcycles | Online Stores | General Products
[ 1 ] Automobiles / Motorcycles | Online Stores | Parts / Accessories
[ 1 ] Beverages | Coffee | Brands