below is url : http://test.com/admin.php?&state=JAMMU+&KASHMIR
using get method i want value of parameter state.
thanks for help
Advertisement
Answer
Try the below code
echo $_GET['state'];
Update:
To get &
as a value in GET variable it first need to be encoded i.e.,
The url would be
'https://www.test.com/admin.php?&state='.urlencode('JAMMU+&KASHMIR') echo urldecode($_GET['state']);