Make sure that the string is in the following JSON format which is something like this:
{"result":"success","testid":"1"} (with " ") .
If not, then you can add "responsetype => json" in your request params.
Then use json_decode($response,true) to convert it into an array.