Re: Trouble getting $HTTP_RAW_POST_DATA

From: Date: Fri, 01 Aug 2003 15:05:33 +0000
Subject: Re: Trouble getting $HTTP_RAW_POST_DATA
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-157951@lists.php.net to get a copy of this message
* Thus wrote Donald Tyler (dtyler@frazerbilt.com): > > Also, print_r() does not include any HTML formatting, so you will need to > look at the source for the page in the browser to make it readable. This is a problem I run into all the time, I am curious of how many people have run into this. I've been considering writting a patch for php that will enable an option to htmlentity the strings. The alternative would be to write a function that loops through all the results: function my_print_r($var) { $r = print_r($var, true); foreach($var as $key => $val) { if (is_string($val) ) { $val = htmlentities($val); } elseif (is_array($val) { $val = my_print_r($val); } $r[$key] = $val; } return $r; } Since print_r is usually used for debugging, it would be nice that php does this for you. Any comments on this before i throw the idea to the php-dev list? Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#157951) next »