title: ajax is producing [object object]?
body: <p>I'm getting an [object object] from my ajax response.</p>
  
  <pre><code>        $.ajax({
              type: "GET",
              data: "id_1="+id_1+"&amp;id_2="+id_2,
              url:"ajax/url.php"
          }).done(function(data){
              var left= $(data).find("#left");
          $("#left").html(left);
              alert(left);
  
  
          });
  </code></pre>
  
  <p>In my url, I just have a simple coding</p>
  
  <pre><code>if(isset($_GET["id_1"]) &amp;&amp; isset($_GET['id_2'])){
      $id_1 = $_GET["id_1"];
      $id_2 = $_GET['id_2'];
  
      $right= $dbh-&gt;prepare("SELECT COUNT(*) FROM table WHERE id_1 = ?");
      $right-&gt;execute(array($id_1));
      $left= $dbh-&gt;prepare("SELECT COUNT(*) FROM table WHERE id_1 = ? ");
      $left-&gt;execute(array($id_2));
  
  
      &lt;div id='right'&gt;&lt;?php echo $right-&gt;fetchColumn();?&gt;&lt;/div&gt;
  
      &lt;div id='left'&gt;&lt;?php echo $left-&gt;fetchColumn();?&gt;&lt;/div&gt;
  
  
  
  }
  </code></pre>
  
  <p>When I this is all done, it alerts back [object object]</p>
  
  <p>anyone know why it does that?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>I added some coding in the .done(function())</p>