Okay, is that the var_dump of the expected output or of the data you have that you want to convert? As if that is the data you want to convert, you already have a PHP array, if it is the expected output, can you provide the var_dump of the data you want to convert as well?
Okay, I’ll try playing around with a few regular expressions when I get home, that could hopefully simplify this process. As if you can write a regex that matches the key and the value of said key, you can then loop through the matches to create your associative array.
Your updated code has quotes around the array keys, I didn’t see that in the original text you posted. In fact, that is entirely different than the original text you posted, so which text do you have to convert?
Just where are you getting this “array string”…and how do you know it is not actually an array? And just maybe, you can help yourself instead of being spoon fed like…[omitted]. Most of the code to convert the “array string” with regex is provided. Now help yourself for a change and make the necessary edits to solve the issue on Post #11.
Yes I know I could be nicer…
But those that don’t help themselves just aggravate me to no end.