下面我有值,下面我有一个 while 循环,其中有多个按 $top_list_friends['workouts'] 排序的值,最高的数字在顶部。
如何将以下值合并到一个列表中?
echo "<div class='user'>";
echo "<span class='number'>" . $my_rank . "</span>";
echo "<span class='name'>" . $personal['name'] . "</span>";
echo "<span class='workouts'>" . $personal['workouts'] . "</span>";
echo "</div>";
$i = 0;
while ($top_list_friends = mysql_fetch_array($query_top_list_friends)) {
$i++;
echo "<div class='user'>";
echo "<span class='number'>" . $i . "</span>";
echo "<span class='name'>" . $top_list_friends['name'] . "</span>";
echo "<span class='workouts'>" . $top_list_friends['workouts'] . "</span>";
echo "</div>";
}