title: PHP multiple entries
body: <p>I'm creating a small project with PHP/MYSQL but i can't get my query working the way i need it. I have 2 tables</p>
  
  <p>Table 1 (char):</p>
  
  <pre><code>Id, name.
  </code></pre>
  
  <p>Table 2 (spells):</p>
  
  <pre><code>Id, char, spell_name.
  </code></pre>
  
  <p>I'm getting the output: </p>
  
  <pre><code>Name Spell1
  Name Spell2
  Name Spell3
  </code></pre>
  
  <p>But I need it to be: </p>
  
  <pre><code>Name Spell1
       Spell2
       Spell3
  </code></pre>
  
  <p>Here's my query:</p>
  
  <pre><code> $query = "SELECT char.name AS name, spells.spell_name AS spell
                FROM char, spells
                WHERE (char.id = spells.spell_name)";
  </code></pre>
  
  <p>Any ideas?</p>