return a php associative array to javascript array
<p>I am trying to return a php associative array to javascript array through ajaxRequest.responseText</p>

<p>Here's what I do.</p>

<p>First in php, I do this: </p>

<pre><code>$encoded = json_encode($thisarray);
echo $encoded; 
</code></pre>

<p>If I echo $encoded, I get {"a":"apple,arrow","b":"boy,bank","c":"cat,camp"}</p>

<p>Then in js script, </p>

<pre><code>thisarray = new Array();
thisarray = ajaxRequest.responseText;
</code></pre>

<p>If I alert thisarray, I get {"a":"apple,arrow","b":"boy,bank","c":"cat,camp"}</p>

<p>That's wrong since alerting an array should give error. But in this case, when I alert thisarray, I get the full array!!</p>

<p>Needless to say, I can't call my value out of thisarray, since it is yet defined as an array.</p>

<p>Anyone can tell me what am I missing here?</p>
