比如在php里有这样的二维关联数组:
```bash
$where_in = [
'id' => [1,2,34],
'state' => [35,6,7,8],
];
$where = [
'age' => 18,
'sex' => 1,
];
$type = [
1,
2,
];
$params = [
'name' => '张三',
'where' => $where,
'where_in' => $where_in,
'type' => $type,
];
```
如何通过get接收参数传递?
url是这样的:
http://192.168.3.107:8000/item?name=张三&where[age]=18&where[sex]=1&where_in[id][0]=1&where_in[id][1]=2&where_in[id][2]=34&where_in[state][0]=35&where_in[state][1]=6&where_in[state][2]=7&where_in[state][3]=8&type[0]=1&type[1]=2
如果通过c.Request.URL.Query() 去接收,返回的是一个 k v类型的map,无法合并
有疑问加站长微信联系(非本文作者)