Decode URL into an array rather than a string

Viewed 8615

I am currently working with PayPals API and want to transform one of its response from a name-value pair to an array.

So far I have used urldecode() to decode the response to the following:

RECEIVERBUSINESS=foo@bar.com&RECEIVEREMAIL=another@email.com&MOREINFO=lots more info`

What I would like is to have the following:

RECEIVERBUSINESS => 'foo@bar.com'
RECEIVEREMAIL => 'another@email.com'
MOREINFO => 'lots more info'

I'm just not quite sure how to get there!

2 Answers
Related