PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
abeall wrote:So if PHP is getting \n, why is it converting them to 
, if it doesn't help anyway?
A friend of mine usually answers these kind of questions with "because it can"
All I can tell you is php calls the function xmlNewDocNode of libxml2 to create a new text node. Maybe you can contact someone more involved with http://xmlsoft.org/index.html to answer your question.
foreach ($_POST as $key => $val)
$_POST[$key] = str_replace("\r",'',$_POST[$key]);
Apparently, the parser converts \r to $#xD; but leaves \n alone. Since I was posting from a Windows machine, the data has \r\n at the end of each line, and the parser encoded \r but left \n alone. So stripping out the useless \r fixed things.