Difficult to provide code without seeing your code.
How is this information stored?
Is the discID in one table, with a subtable containing rows identified by that discID?
But here's a while-loop snipped from php.net:
<?php
mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb");
$result = mysql_query("SELECT id, name FROM mytable");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
printf("ID: %s Name: %s", $row[0], $row[1]);
}
mysql_free_result($result);
?>
The while is typically used while you're doing something, like fetching a result from db. If you already HAS done something, like created an array of data, you may use for to loop through the stuff:
$mx = arrary("pigs","cows","birds","horses");
for($i=0;$i<sizeof($mx);$i++) {
echo "Animal: ".$mx[$i]."<br>";
}
knutm :-)