title: Make HTML list from PHP array?
body: <p>I'm very new with PHP/Mysql, but I'm trying to make movie database.
  There's a form where people can put in info about the movies, and the send button stores it in my database. Then another web page displays the movie list.</p>
  
  <p>The text input and dropdown selections were easy. What I'm really struggling with is the multiple checkbox part. After hours of struggling I finally learned about the php array and how I can store all the values from my checkboxes using implode. My code looks like this:</p>
  
  <pre><code>$genre = implode( ';' , $_POST['genre'] );
  </code></pre>
  
  <p>This saves all the selected genres in the database, seperated by ;</p>
  
  <p>However, I need help in displaying this data on my html page the way I want:
  First off, I want to retrieve the results in a html list, instead of a;b;c
  Second, I want to change a;b;c etc to actual words - for example Horror, Action, Comedy. Can this be done? </p>
  
  <p>Hope someone can help! Thanks!</p>
  
  <p>EDIT:
  A friend told me that the best way to handle multiple checkbox values is to store them in a different table (moviegenres) and use mapping. So I rearranged my database like this:
  One table called 'movies' that has the columns 'movieID' and 'title', and one table called 'moviegenres' that has the columns 'movieID' and 'moviegenre'.</p>
  
  <p>I can still save the title into 'title' in 'movies', but when I want to add a command for adding genre to the 'moviegenres' table, nothing works...</p>
  
  <p>What is the simplest way to do this?
  Do I need to different commands for inserting into two tables, or can I do everything in one command, using one variable?</p>