I am trying to echo the amount of issues for each title in my drop down. Right now it is working as far as displaying each title as it is grouped by title. What I want to o is echa the amount of issue per each title
EXAMPLE
Title1 - 76 Results
Title2 - 189 Results
Title3 - 9 Results
So when they click the dopw down they actually see the number of results they'll get when they go to the display page.
<?php
$result = mysql_query("SELECT title FROM comics GROUP BY title") or die(mysql_error());
$options="";
echo "<select name='title'>";
while($row = mysql_fetch_array($result)){
$rows = mysql_num_rows($result);
$title=$row["title"];
echo "<option value='" . $title . "'>".$title. " (" . $rows . " Issues)</option>'";
}
echo "</select>";
?>
<input type="submit" name="submit">
</form>
Right now it just echoed 363 issues next to each title in the drop down.
Any suggestions?
Thank you for your time.
SC