I'm receiving a query string (from a terrible payment system whose name I do not wish to sully publicly) that contains un-encoded ampersands
name=joe+jones&company=abercrombie&fitch&other=no
parse_str can't handle this, and I don't know enough of regex to come up with my own scheme (though I did try). My hang up was look-ahead regex which I did not quite understand.
What I'm looking for:
Array
(
[name] => joe jones
[company] => abercrombie&fitch
[other] => no
)
I thought about traipsing through the string, ampersand by ampersand, but that just seemed silly. Help?
parse_str& add the current key to the previous value if the value of the current key is an empty string.