I want to get the id from my url like below
http://localhost/cpanel-ar/stage_one/reports.php?temp=temp_21day
How can GET only the "temp"?
I want to get the id from my url like below
http://localhost/cpanel-ar/stage_one/reports.php?temp=temp_21day
How can GET only the "temp"?
3
Answers
i dont know if i understood but you can use predefined variables using:
but if you are using a framework maybe they already is handle that.
if you want the ‘temp’ name and you know witch parameters are passed to URL you can use
Where
i
i the index of parameterwhy you dont try to use
substr
function?its will only catch
temp
I assume that you mean this:
This will return an array with your get parameters.
for example:
http:example.com?getparameter=getvalue
returns: