php - How to check for ANY parameter existence in the URL? -
When I use any page.php version, which contains a parameter, Like:
page.php? Foo = 1 or page.php? Bar = 3
I have a $ var .
I only know if a specific parameter exists or not, how it is known:
if (isset ($ _GET ['foo'])) $ Var = "yes"; But how can I check that there is a parameter present?
$ _ GET Check the contents of the whole array:
if (empty ($ _ GET)) {// do something}
Comments
Post a Comment