below is get request passed in my url i want value of min[min] and else likewise
min[min]=0&min[max]=50
i wrote below code which seems not working
echo $_GET['min[min]']
echo $_GET['min["min"]']
is there any specific way to get o/p
PHP will parse this for you (using urldecode
) and put the values into an array.
You can access the values like this:
echo $_GET['min']['min'];
echo $_GET['min']['max'];
Note If you must have the square brackets (you probably shouldn't), you can url encode them, giving the query string as min%5Bmin%5D=0&min%5Bmax%5D=50
, and then you can access them like this:
echo $_GET['min[min]'];
echo $_GET['min[max]'];
min=0&max=50
$_GET['min']['min']
.