I have a string category=45&format=1 that I want to convert into a key=value array.
Does anyone know if there is a quick way of doing this without having to write a function that explode's the & and then the =?
Since you're dealing with the URL query format: parse_str
parse_str('category=45&format=1', $array);
http://php.net/parse_str
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With