Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I just tried to write this comment:
You could use $arr = explode(' ', $str); to split $str by . Then you could do the same on = to get your key->value pairs.
$arr = explode(' ', $str);
But it chokes on and formats like so: