title: PHP/MySQL - Combining two tables in an array
body: <p>SQL Noob here. My table is like this:</p>
  
  <p>Main table</p>
  
  <pre><code>+-----------+-------------+
  | talent_id | talent_name |
  +-----------+-------------+
  |         1 | Talent1     |
  |         2 | Talent2     |
  |         3 | Talent3     |
  +-----------+-------------+
  </code></pre>
  
  <p>Education Table</p>
  
  <pre><code>+-----------+-----------+-----------------------------+
  | talent_id |   level   |           course            |
  +-----------+-----------+-----------------------------+
  |         1 | Post-Grad | Master in Something         |
  |         1 | Post-Grad | Doctor in Something         |
  |         1 | College   | BS Something Engineering    |
  |         2 | College   | BS Something Science        |
  |         2 | Post-Grad | Master in Something Science |
  |         3 | College   | BS Computer Something       |
  +-----------+-----------+-----------------------------+
  </code></pre>
  
  <p>Is it possible to combine the columns from the two tables in one query? I tried having separate queries (which worked, by the way) but I am having a hard time combining those two in an array. And if just in case that having separate queries is the better solution, Can you guys give me an idea how to iterate through the two array results and combine it into something like this:</p>
  
  <pre><code>Array( [0] =&gt; Array(
               'talent_id' =&gt; '1', 
               'talent_name' =&gt; 'Talent1', 
               'course' =&gt; Array('Master in something', 'Doctor in something', 'BS Something')),
         [1] =&gt; Array('talent_id' =&gt; '2', ...) )
  </code></pre>
  
  <p>Stack Overflow has been a great help for me since the start of my internship. And I want to thank all of you for that.</p>