title: How to make multiple tags system for blogs?
body: <p>I have my database setup like this:</p>
  
  <pre><code>posts
      post_id; primary_key
      title;
      content;
      date;
  tags
      tag_id; primary_key
      post_id;
      tag_name;
  </code></pre>
  
  <p>In this blog, I'm letting users post their own tags, like YouTube.
  So lets say, I'm letting the users type the tags in an input box.
  For example, user types:
  Cat Dog Food.</p>
  
  <p>I want PHP to convert the input into an array and store it in the data base like this.</p>
  
  <pre><code>tags
  
      tag_id | post_id | tag_name
          1       1       Cat
          2       1       Dog
          3       1       Food
  </code></pre>
  
  <p>I think we can convert that string into an array using explode().
  However, how do I structure my query to store into the database the way I want?</p>
  
  <p>I basically want PHP to break each tag down, and store each tag in a separate row.</p>
  
  <p>I'm using the while loop to pull each tags into the post btw.</p>