Which one below is correct? First code has no quotes in the $_GET array and the second one does, I know you are supposed to have them when it is a string of text but in this case it is a variable, also what about if the key is a number?
no quotes
function arg_p($name, $default = null) {
return (isset($_GET[$name])) ? $_GET[$name] : $default;
}
with quotes
function arg_p($name, $default = null) {
return (isset($_GET['$name'])) ? $_GET['$name'] : $default;
}