I have many $_GET parameters in url which i want to filter.
Like:
?article=123456
?search=bill
?category=general
?add_article=1
?add_archive=1
?add_biography=1
I want to exclude all GET variables which have 1 as value
Instead of
if( $_GET['add_article'] != 1 && $_GET['add_archive'] != 1 && $_GET['add_biography'] != 1) {
// show content for other GET variables
I tried this:
if( array_values($_GET) != 1) {
// show content for other GET variables
But this does not work. How can i achieve this easyly?