print_r() and mail() in PHP outputs something different, why?
Posted
by ilhan
on Stack Overflow
See other posts from Stack Overflow
or by ilhan
Published on 2010-06-17T17:20:54Z
Indexed on
2010/06/17
17:23 UTC
Read the original article
Hit count: 177
I have a html form where visitors can fill and send me some information, as an e-mail. It sends like this:
$body = print_r($_POST, true);
mail ($to, $subject, $body, $headers);
When they write abc'def I get abc\'def
What is this additional \
? How I can prevent it?
© Stack Overflow or respective owner