I have a variable with the following info:
$userdata="?username=hello&name=world&status=active"
Now what i want my script to do is that it detects the ? and & and fetches the text in between, "username", then I want it to detect the = and & and fetches the content in between: "hello", the same for the next content between & and = (name), the content between = and & (world) and again...the content between & and = (status), the content between = and & (active).
after the detection I want it to set an new variable
$username=hello
$name=world
So how do I script something like this?
I want to do this because i have an encrypted parameter ?auth= and when its decrypted on server side I do not want it to show the decrypted content (more parameters) to the front side and set it in variables.