Reputation: 4044
I have the following string:
address=test&address2=test2&[email protected]
How can I extract the keys (address, address2, email) and values ("test", "test2", "[email protected]")
Thank you!
Upvotes: 0
Views: 83
Reputation: 1039
since this is just a string I would use explode() with delimiters as '&' and then '=', not a great idea but works
Upvotes: 0
Reputation: 3201
Use parse_str()
http://pl.php.net/manual/en/function.parse-str.php
Upvotes: 5