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);