M
M
mtrue2016-03-26 14:14:47
Computer networks
mtrue, 2016-03-26 14:14:47

How to correctly specify an array of elements in a GET parameter?

I have seen three possible cases of an array declaration:

  1. ?param=[1,2,3] problem: what about strings?
  2. ?param[]=1¶m[]=2¶m[]=3 cumbersome
  3. ?param=1¶m=2¶m=3 it is not clear that the parameter is an array

Is there some standard how an array should be specified?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor, 2016-03-26
@egormmm

I specify ?param=[1,2,3] or ?filter=price[777,3127];manufacturer[16].
And then I break implode(). Or you can write a function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question