I've created a PHP script that takes the contents of an array and stuffs them into a variable called $body:
foreach($_POST as $var => $value)
{
if (($var != "Submit") && ($value != "")) {
$body .= $var .': '.filter_var($value, FILTER_SANITIZE_STRING) . '<br>';}
}
This $body then forms the body of an HTML email. All is fine until those contents get too long, and then I end up with an emails that sometimes lose a <br />
(because it becomes <b
on one line and r />
on the next. This causes my fields to run together in the email client.
Ideas?
EDIT: I tried adding \n
before the break, but my email client displays them
But with double quotes it worked. Thanks!