2

I can use this to find out if a specific $_GET variable is set:

if (isset($_GET['this'])) {

However, I am trying to check if ANY $_GET variables exist. So, I do:

if (isset($_GET)) {

  return true;

} else {

  return false;

}

I have also used:

if (is_array($_GET))

The problem is, no matter what even with no $_GET variables in the URL, it always returns TRUE.

What is the proper way of checking if ANY $_GET variables exist without having to specify which one specifically?

MultiDev
  • 10,389
  • 24
  • 81
  • 148

0 Answers0