Suppose I have the following string $shortcode:
content="my temp content" color="blue"
And I want to convert into an array like so:
array("content"=>"my temp content", "color"=>"blue")
How can I do this using explode? Or, would I need some kind of regex? If I were to use
explode(" ", $shortcode)
it would create an array of elements including what is inside the atribute; the same goes if I were to use
explode("=", $shortcode)
What would be the best approach?