title: Convert JSON string to PHP Array
body: <p>I have the following JSON string, which was an Objective C array then encoded to JSON:</p>
  
  <pre><code> $jsonString=[\"a@gmail.com\",\"b@gmail.com\",\"c@gmail.com\"]
  </code></pre>
  
  <p>I want to convert this to a regular PHP array. I've tried many things but none of them seem to work:</p>
  
  <pre><code>$arrayOfEmails=json_decode($jsonString); //doesn't work
  $arrayOfEmails=(array)json_decode($jsonString); //doesn't work
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I'm still not getting it to work.</p>
  
  <pre><code>$decodeEmails=$_POST["arrayOfEmails"];
  sendResponse(200, $decodeEmails);
  //the above returns exactly whats after this colon:[\"a@gmail.com\",\"b@gmail.com\",\"c@gmail.com\]
  </code></pre>
  
  <p>I need to do this:  <code>$arrayOfEmails=json_decode($decodeEmails);</code>
  But I think I need quotes around $decodedEmails for this to work. How can I add quotes around $decodeEmails string?</p>