I was playing around trying to find a way to addslashes() to all my variables, and I
came up with this snippet. Hope it helps someone
$keys = array_keys($HTTP_POST_VARS);
$post_size = sizeof($keys);
for($x = 0; $x < $post_size; $x++)
{
$temp = $keys[$x];
//you can replace addslashes with whatever you want to use
${"$temp"} = addslashes($HTTP_POST_VARS["$temp"]);
}
- Re: [PHP] How to apply something to every variable Chris Anderson
- Re: [PHP] How to apply something to every variable teo
- Re: [PHP] How to apply something to every varia... Chris Anderson
- RE: [PHP] How to apply something to every variable Chadwick, Russell
- Re: [PHP] How to apply something to every varia... Chris Anderson
- RE: [PHP] How to apply something to every varia... PHPBeginner.com
- Re: [PHP] How to apply something to every v... Chris Anderson

