title: Mixing Associative Arrays
body: <p>I have a function that gets from the DB all the data of the users from different tables.
  I am using <code>PDO</code> and what returns for each <code>SELECT</code> is an <code>associative array</code>.</p>
  
  <p>What I want is that the function will return only one <code>array</code> including all the info taken from the DB. So a big <code>array</code> with all the user data.</p>
  
  <p>The problem is that I am getting errors because I can't simply merge more <code>arrays</code> or I'll have <code>Array to string conversion error</code>.</p>
  
  <p>How can I mix all the <code>arrays</code> in one understandable <code>array</code>?</p>
  
  <pre><code>function userInfo($uID, $pdo) {
      $user = PDOselect('user', '*', array('id_user'=&gt; $uID), $pdo);
      $user_registration = PDOselect('user_registration', '*', array('id_user'=&gt; $uID), $pdo);
      $user_addfields_anagraphic = PDOselect('user_addfields_anagraphic', '*', array('id_user'=&gt; $uID), $pdo);
      $user_addfields_legal = PDOselect('user_addfields_legal', '*', array('id_user'=&gt; $uID), $pdo);
      $user_addfields_public = PDOselect('user_addfields_public', '*', array('id_user'=&gt; $uID), $pdo);
      return .....
  }
  </code></pre>