where ever you are going to referance $HTTP_POST_VARS use $GLOBALS[HTTP_POST_VARS] and then use that inside your function.
function myFunc() { foreach($GLOBALS[HTTP_POST_VARS] AS $k => $i) { $GLOBALS[HTTP_POST_VARS][$k] = stripslashes($i); $GLOBALS[HTTP_POST_VARS][$k] = strip_tags($i); } } and after this function $GLOBALS[HTTP_POST_VARS] will look like you want it to. Jim Lucas bend.com ----- Original Message ----- From: "Bryan McCloskey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 21, 2002 2:19 PM Subject: [PHP] function trouble: pass by referrence > Hello all, > > I'm trying to pass the $HTTP_POST_VARS array into a > function to run some things like strip_tags, trim, and > htmlspecialchars on all of the variables. If possible, > I would like to pass this array by referrence, and > have the function make changes to the actual array and > not a copy. Accomplishing this is giving me fits, > however. Can anyone help? > > -bryan > > ===== > -------------------------------------------------------------------------- - > Schrodinger may have slept here. > -------------------------------------------------------------------------- - > > __________________________________________________ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]