title: PHP PDO STMT Fetch - specify table in $row variable?
body: <p>I'm using PDO's fetch to return data from two tables (orders and order_items).  </p>
  
  <p>The issue is I would like all the order_item row data to be nested as arrays inside each order data row.</p>
  
  <p>Whilst looping through the rows is it possible to do the following?</p>
  
  <pre><code>$variable = $row[tablename.columnname]
  </code></pre>
  
  <p>I've tried this with and without specifying an alias for in my query <code>(SELECT * FROM orders as orders WHERE ...etc..)</code> and I'm getting an <code>'Notice: Undefined index:'</code> error. Any ideas?</p>
  
  <p>EDIT - THIS QUESTION IS DIFFERENT</p>