> echo setor($required_variable, die('error...');
> or
> echo setor($error, '');
> or
> echo setor($sMessage, $sDefaultMessage).
> or
> $z = setor($_GET['z'], 'Default');
> $z = setor($_GET['z'], 'Default');
Whats wrong with defining a user-level function?
function setor_array(&$array, $key, $default = 0)
{
return isset($array[$key']) ? $array[$key] : $default;
}
$nCustID = (int) setor_array($_GET, 'nCustID', 0);
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php