k, so like I said. Just a matter of adding a bit to the loop.
$rows = mysql_num_rows($result); // number of rows returned
$i=1; // internal counter
while($row = mysql_fetch_array($result)) {
echo $row['playername'];
if($i < $rows) {
// while we haven't hit the last row, add commas
echo ", ";
}
$i++; // increment counter
}