Hi everyone,
I am using mail() to send customers an order confirmation. All variables display correctly. What I am having a problem with is within my variable $message, I have a dynamically created array variable called $cartOutput which has a list of all items purchased. In the email received by the customer $cartOutput displays all the items in one continuous line instead of 1 line per item.
Example:
“Soap $4.00 Shampoo $3.00 Milk $3.50”
instead of:
Soap $4.00
Shampoo $3.00
Milk $3.50
Within my loop, the variable code looks like this:
$cartOutput .=‘Product: ’ . $product_name . ’ Price:’ . $product_price . ’ Quantity:’ . $product_quantity . ’ Line ttl:’ . $product_price . ‘’;
$cartOutput .= ‘’;
Within the quotes of the 2nd $cartOutput, I’ve tried \r\n , \n , even
but it just displays as regular text. i.e.: “Soap $4.00\r\nShampoo $3.00\nMilk $3.50
”
I tried removing the quotes but that gives me a syntax error.
I’ve even tried to put it in a table but that too shows the
Please help.