Monty wrote:
Is there any way to get JUST the user-defined variables in PHP? Problem with
get_defined_vars() is that it contains everything, including server and
environment vars, and there's no easy way to keep just the user-defined vars
part of the array created by get_defined_vars.

Monty


foreach ( get_defined_vars() as $key => $val ) {
if ( ! preg_match ( "/_POST|_GET|_COOKIE|_SERVER|_ENV|_FILES|_REQUEST|_SESSION/", $key ) ) {
$user_defined[$key] = $val;
}
}


--
John C. Nichel
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to