GRY
GRY

Reputation: 724

Curl return xml as array

I have a curl procedure in php which returns xml or JSON from Google Places API. I understand Google Places requires that request is returned in XML or JSON. I wonder if curl can translate this into an array for me? I would prefer greatly not to do it myself.

Upvotes: 0

Views: 340

Answers (1)

Gustav Westling
Gustav Westling

Reputation: 633

$array = json_decode($data, TRUE); 

Upvotes: 3

Related Questions