If I were to call:
www.*.com?hello
if($_GET["hello"]){
}
It will always return false because ?hello variable needs to be set as something...
Is there a way to get the ? part without setting the variable to anythign before hand?
You can check if variable is set like this:
if(isset($_GET["hello"])){
}
sometimes key_exists() is better because if $_GET["hello"] == null you can get false
if (key_exists("hello", $_GET)) {
}
Use array_key_exists:
if (array_key_exists("hello", $_GET)) {
}
Please read this for a difference between isset and array_key_exists.