i have a php code like this
<?php
if(isset($_GET['qry'])) {
echo $_GET['qry'];
}else if(isset($_GET['ct'])) {
echo $_GET['ct'];
} else if(isset($_GET['sct'])) {
echo $_GET['sct'];
} else if(isset($_GET['brand'])) {
echo $_GET['brand'];
} else {
echo "";
} ?>
what is happening here is that i want to get the value from the variables in the url but somethings they are different on the same page. so please is there a simpler way to do this by getting all the values from the variables and assigning it to a variable inside my code without typing out all the variables in the page something like
eg
$allVariables = $_GET['get all variables'];
if($allVariables == '1'){
//do this
}
OR
if($allVariables == '2') {
// do this
}
please is there a way i can do this