Answer the question
In order to leave comments, you need to log in
Generate route, parameter as array of values? as?
doing so
$this->generateUrl("some-route", [ "filter" => [123,456] ] )
/my-route?filter%5B0%5D=123&filter%5B1%5D=456
т.е ?filter[0]=123&filter[1]=456
Answer the question
In order to leave comments, you need to log in
An example from the documentation for the http_build_query function:
$parameters = ['files' => [1,2,3,4,5,6,7,8,9,10]];
echo $query = http_build_query($parameters);
echo $query = preg_replace('/%5B[0-9]+%5D/simU', '%5B%5D', $query);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question