Recurring results

hey,

how would you go about having 10 results show up in 10 dynamic text fields all called name1,name2 etc here is my code and query:

$query = "SELECT * FROM leaderboard ORDER BY score DESC LIMIT 10";
$result = mysql_query($query);
$num = mysql_num_rows( $result );
$i = 1;

while($line = mysql_fetch_array($result)){
$name[$i] = $line['firstname'];
$score[$i] = $line['score'];
$i++;
}
for ($i=1; $i<=$num;$i++){
$text = $results . "&name$i=" . $name[$i] . "&score$i=" . $score[$i];
}
echo $text;
//print (mysql_error());

?>