PHP - 使用<pre> tags via email

时间:2015-09-01 21:13:56

标签: php function email

I've created my first multi-page form using php.

I like the way that the form data can be output using -

echo '<pre>'.print_r($_POST,true).'</pre>';

However, instead of printing, I'd like to keep that formatting but have it sent via email using the mail function.

1 个答案:

答案 0 :(得分:-2)

are you sending it as a html email? because it wont work in plain text

See example 4 http://php.net/manual/en/function.mail.php