i am having a hard time with a little proceedure i am trying to come up with. I have a query that pulls some information from a database then explodes it into an array where i can display it. i tried using a while loop but that didnt do it. So i guess what i am asking is how would i tell when there is no more data in the array so that i can stop the loop, this is my latest failed attempt:
mysql_connect($dbhost,$dbuser,$dbpass) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
$query = "SELECT artist FROM audio WHERE coverart = '$coverart'";
$result = mysql_db_query($database,$query);
if (!$result) {
echo mysql_error();
} else {
echo ("
<table border=0 cellspacing=0>
<tr>
<td align=center>
<font face=\"Arial\" size=\"+1\"><b>Contributing Artist's</b></font>
</td>
</tr>
");
$explodeme = mysql_result($result,0,artist);
$artist = explode(":",$explodeme);
while (isset($artist[$x])) {
echo ("
<tr>
<td>
$artist[$x]
</td>
</tr>
");
$x++;
}
echo ("</table>");
}