title: print_r() displays sql statement instead of printing the pdo result set?
body: <p>I am trying to debug why the below query does not return a result set.  When I tried debugging this using print_r to see what this sql returns , i get the sql statement itself instead of the result set.  Can someone help me with why this doesn't return a result set ?</p>
  
  <p>Edit: I am using query function of the PHP Data Objects  </p>
  
  <pre><code>  $query = "select * from categories order by categoryID";
  
    $categories = $db-&gt;query($query);
  
    print_r($categories);
  </code></pre>