I have multiple values so i want to send them in query string. I have found a solution from stackoverflow but it does not working properly. Can any on guide me where i'm wrong.
www.xyz.com/action=exe?check_ids[]=38&check_ids[]=36&check_ids[]=35
echo $_REQUEST['check_ids'];
For url like www.xyz.com/action?check_ids[]=38&check_ids[]=36&check_ids[]=35 you can do this :
echo $_REQUEST['check_ids'][0]; //print 38
echo $_REQUEST['check_ids'][1]; //print 36
OR use this
foreach($_REQUEST['check_ids'] as $id)
echo $id;//this will print the individual values
There are several ways you can do it by using commas:
// to get an array use explode
var_dump(explode(",", $_GET['check_ids']);