Possible Duplicate:
Why does PHP echo'd text lose it's formatting?
I cant get the new line to function work right. It just comes out as one line. Like this –
Make: Sony Model: a Processor: Intel Core 2 Duo
This is the code for it —
$message="Make: " . $_POST['make'] . "\r\n Model: " . $_POST['model'] . "\r\n Processor: " . $_POST['processor'];
When this is sent as an email it works perfect but when i do
echo $message;
it just comes out as the above – it all on one line. How can i make this work?
thankyou
You are presumably echoing this onto a web page.
Browsers do not (or at least, should not) respect literal new lines, you have to use the HTML
<br>tag instead.Try this: