How would you convert a string like that to an associative array in PHP?
key1="value" key2="2nd value" key3="3rd value"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use a regular expression to get the key/value pairs:
But this would just get the complete key/value pairs. Invalid input like
key=value"would not get recognized. A parser would do better.