what's type for data in success: function(data)?
<p>Here $fruit is encoded by js_encode() and send back to data in ajax. My questions is what datatype of data is(string or array)?
Thanks in advance!</p>

<pre><code>$.ajax({
                                type:"post",
                                dataType:"json",

                                url:"phpFile.php",
                                success: function(data) {


                                }
                          });

&lt;?php
    $fruits = array(array("1","apple"),array("2","pear"));
    echo js_encode($fruits);
?&gt;
</code></pre>
