The following PHP code populates a dropdown list of Projects. I would like to be able to click on a Project Name in the list and have its corresponding list of Characters appear beside it. How can I tie jquery into this as it's running? All the jquery examples I see are for hard coded HTML data instead of a PHP loop grabbing from a database.

//creates the Project dropdown list
while ($proj = mysql_fetch_array($project)){
  $id_proj = $proj['projid'];
  $name_proj = htmlspecialchars($proj['projectName']);
  echo "<option name='$id_proj' value='$id_proj'>$name_proj</option>\n";

//creates the Characters list
while ($character = mysql_fetch_array($characters)){
 $id_char = $character['id'];
 $name_char = htmlspecialchars($character['charactersName']);
 echo "<div>$name_char</div>";		
I don't care if it's a clickable list of anchors instead of a dropdown. Also, I don't care whether people have javascript enabled as this is for my personal use.