While fetching parameters from url(GET Request):
http://localhost:8080/xyz/abc/1234?size=4&chunks=0_5&lang=0,1,2,3
I am able to access argument 1234 and params by:
$params = $request->getQueryParams();
$argument = $args['id'];
$size = $params['size'];
$chunk = $params['chunks'];
But I am not able to access 'lang' by:
$lang = $params['lang'];
However changing the request parameter from 'lang' to 'langs' seems to work:
http://localhost:8080/xyz/abc/1234?size=4&chunks=0_5&langs=0,1,2,3
Now I am able to access 'langs' by:
$lang = $params['langs'];
Why is this happening? Is this because lang is a keyword in getQueryParams()? I searched google but did not find a concrete answer. Any help is greatly appreciated.
Thank You for your time.