I can't seem to figure out how to loop a variable check. What I am trying to do is something like checking those two variables but in a loop
if(isset($_GET['action'])){
$action = $_GET['action'];
}
else{
$action = NULL;
}
if(isset($check)){
$check = $check;
}
else{
$check = NULL;
}
I want to do something like this or more effiecient if possible
$variables = array($_GET['action'], $check);
$define = array($action, $check);
foreach($variables as $variable){
if(isset($variable){
$variable = $define;
}
}
I want it to show no errors while I have error_reporting(E_ALL) open Could someone help me with this?