Re: Applying a function to ALL variables?

From: Date: Fri, 06 Jul 2001 20:09:00 +0000
Subject: Re: Applying a function to ALL variables?
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2084@lists.php.net to get a copy of this message
Nevermind actually. I believe I figured it out, I did it like this: function ApplyToVars() { $keys = array_keys($HTTP_POST_VARS); $post_size = sizeof($keys); for($x = 0; $x < $post_size; $x++) { $temp = $keys[$x]; $HTTP_POST_VARS["$temp"] = addslashes($HTTP_POST_VARS["$temp"]); } } It seems to work very well. I hope it helps someone. ----- Original Message ----- From: "Chris Anderson" <chrisderson@ameritech.net> To: <php-gtk@lists.php.net> Sent: Friday, July 06, 2001 3:55 PM Subject: [PHP-GTK] Applying a function to ALL variables? In a few scripts I call a database and have around 30-40 variables depending on the table. My question is that is there is there a way to apply a function like addslashes() to all my variables?

« previous php.gtk (#2084) next »