title: turn cURL json array response to an associate array
body: <p>I have a cURL request like so</p>
  
  <pre><code>$ch = curl_init();
  $data = 'filter=year(StartTime)' . urlencode(' eq 2013 and ') .'month(StartTime)'. urlencode(' eq 06') ;
  curl_setopt($ch, CURLOPT_URL, "http://url.com/id()/events?$".$data);
  $headers = array(
      'Accept: application/json',
      'Content-type: application/json',
      'X-ApiKey : XXXXXXXXXX'
  );
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($ch, CURLOPT_HEADER, false);
  
  $response = curl_exec($ch);
  curl_close($ch);
  $result = json_decode($response, true);
  
  ?&gt;
  &lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;br&gt;&lt;br&gt;
  &lt;?php 
   echo "the name". $result['Name'];
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is what it prints.</p>
  
  <pre><code>HTTP/1.1 200 OK Cache-Control: no-cache Pragma: no-cache Content-Length: 218 Content-Type: application/json; charset=utf-8 Expires: -1 Server: Microsoft-IIS/7.5 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET- WEBSRV X-Powered-By: ARR/2.5 X-Powered-By: ASP.NET - ARR02 Date: Mon, 01 Jul 2013 02:52:31 GMT [{"Id":1079,"Name":"Test ","Status":1,"MemberId":1308,"Description":"This is a Test Event","SponsoredBy":null,"StartTime":"2013-06-30T12:00:00","EndTime":"2013-06-30T23:59:00","SearchDescription":null,"Types":[1,4,6]}] 
  
  the name
  </code></pre>
  
  <p>How can I put this into a Associative array?</p>
  
  <p>I've tried this</p>
  
  <pre><code>json_decode($response,true));
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>ksort($response);
  </code></pre>
  
  <p>and this </p>
  
  <pre><code>var_dump($response);
  </code></pre>
  
  <p>and nothing seems to work..</p>
  
  <p>I want to be able to output like this</p>
  
  <pre><code>echo $reponse['Name'];
  </code></pre>
  
  <p>Any help? Thanks</p>