rob, yes i thought of this, you could possible even do function magic($array, $name, $default=null ) { return isset($array[$name]) && $array[$name] ? $array[$name] : $default; } $string = magic($_SERVER, "HTTP_ACCEPT_LANGUAGE", "*") however i wish php would have some built-in support to solve the issue. On 18/07/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
function getServerVar( $name, $default=null ) { return isset( $_SERVER[$name] ) ? $_SERVER[$name] : $default; }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php