In PHP, when I write
$string="\thello world\t"
echo trim($string);
this outputs hello world
. However, when I enter the same string in a HTML form input field and post to the server, the behavior changes.
echo trim($_POST["string"];
The above code outputs \thello world\t
What is the difference?