How to print Array data retrieved from Database using JQuery
<p>I am using cakePHP 1.26, and JQuery.</p>

<p>In a TestingController, I got this line of code<br/></p>

<pre><code>function testing(){
$r = $this-&gt;User-&gt;findallByuser_id(1);
}
</code></pre>

<p>and I am using JQuery Ajax to retrieve the data from function testing():</p>

<pre><code> $.ajax({
      type: "POST",
      url: curl,   
      success: function(data){ 
      alert(data);  
      }     
</code></pre>

<p>Here is the JQuery Alert output: </p>

<pre><code>Array
</code></pre>

<p>And this is cakePHP output:</p>

<pre><code>Array
(
    [User] =&gt; Array
        (
            [user_id] =&gt; 50
            [name] =&gt; hello

        )
       ...
)
</code></pre>
