Hi,
this is strange...
I have this string:
2x Article this|1x Article that|5x Article something|
I do:
ereg_replace("|", "\n", $string);
Then I form a message like this:
$message_body = "Thank you for ordering\n" .
"The following\n" .
"$string" .
"Sincerly yaddayadda\n";
After that when the message is send, I receive the message body like this:
Thank you for ordering
The following
2x Article this 1x Article that 5x Article something Sincerly yaddayadda
For some.. very strange reason.. He eliminates my "\n" in the $string. I've also tried:
ereg_replace("|", "\n", $string);
As well as:
ereg_replace("|", "\r\n", $string);
The $string is formed in a while loop like this:
while (list($key, $val) = each ( $ses_cart_id )) {
$string = $string . $article[$key] . "x " . $article_description . "|";
}
For some.. very strange reason, all the \n characters work perfectly accept the ones that come from this string.
At first I didn't use the "|" seperator, but used . "\n" since that didn't work I thought that was the problem. That's why I ereg_replace the "|" for "\n" but that also doesn't work.
I even tried $string .= chr(13) but that also fails!
Am I doing something wrong or....?
Hope someones knows the answer because I'm running into walls at the moment ;-)
TIA,
Martin.