How to convert curl_exec response to associative array?
<p>I have the following code:</p>

<pre><code>$real_result=curl_exec($ch);
echo $real_result;
</code></pre>

<p>I see the following result: <code>{"result":"LOGIN","old_value":"1"}</code>
I need to convewrt $real_result to simple associative array, because I need to compare that with another array. I have tried it:</p>

<pre><code>$data=json_decode($real_result);
array_intersect(json_decode($real_result), $expected_result);
</code></pre>

<p>But it doesn't work and I have got the message that the first argument is not an array. So, please, tell me how I can do it. Thanks. </p>
