0

I am trying to get values using $_GET from URL. I've used this method to extract variable values when variable names are different. But now in this case variable names are same.

http://example.com/filter.php?tags=name1&tags=name2&tags=name3

3

1 Answer 1

-1

You could get the complete get variable with $_GET then you have an array that you can browse with

foreach ($_GET as $key => $value) echo "Key: $key Val: $value";

But I don't think to have multiple values with the same name is a good choice. You should better change the way you send your params if it's possible.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.