This code does not seem to want to display a new line with echo. Any suggestions would be appreciated.
<?php
$to = "To: example@test.net";
$subject = "\nSubject: Test";
$message = "\nMessage: hello";
$headers = "\nFrom: webmaster@example.com" .
"\nReply-To: webmaster@example.com" .
"\nX-Mailer: PHP/" . phpversion();
echo $to, $subject, $message, $headers;
?>
New line not working...
Moderator: General Moderators
Re: New line not working...
Line breaks don't show in HTML; this is normal. Wrap it in <pre> tags, or use nl2br
Re: New line not working...
I used the <pre> tags and that worked great. Thanks!