this would probably be even better: foreach ( $userInput as $key => $value ) { $newvalue[$key] = sanitize( $value ); // reassign key with sanatized value } return $newvalue // return array with sanatized $key => $value pairs } else My 2 cents: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php