Possible Duplicate:
Parse query string into an array
What's the fastest method, to parse a string of url parameters into a array of accessible variables?
$current_param = 'name=Peter&car=Volvo&pizza=Diavola&....';
//results in a nice array that I can pass:
$result = array (
'name' => 'Peter',
'car' => 'Volvo',
'pizza' => 'Diavola'
)
I've tested a REGEXP, but this takes way too long. My script needs to parse about 10000+ url's at once sometimes :-(
KISS - keep it simple, stupid
Use
parse_str()
.The above will output
the parse_str() can do the trick as you expect