A number of server-side scripting languages like PHP expect each value to be in a separate parameter, with the parameter name ending with []
.
tag_ids[]=7&tag_ids[]=10&tag_ids[]=45
They recognize this syntax and collect all the values into an array. In PHP this would be $_GET['tag_ids'] = [7, 10, 45]
.
You can also optionally put strings inside the []
; in this case, the server language will put them into its keyed data structure (associative array in PHP, dictionary in Python) with those as the keys.
You should call encodeURIComponent
on tag_ids[]
, so they'll actually end up looking like tag_ids%5B%5D
.