我希望echo
按 的值排序$match_count
。最高的数字应该在顶部。
while($row = mysql_fetch_array($result)) {
$num_kanal = count(explode(' ', $row['kanaler']));
$pr_kanal = $row['pris'] / $num_kanal;
$pr_kanal = number_format((float)$pr_kanal, 2, '.', '');
$farve = '#6a6a6a;';
if ($_POST['kanaler']) {
$getkan = implode($_POST['kanaler'], ' ');
$kan = $row['kanaler'];
$match_count = count(TheMatch($kan, $getkan));
$match = ' Match = '.$match_count;
}
// I WANT THIS ECHO TO BE SORT BY THE VALUE OF '$match_count' HIGEST NR IN TOP //
echo'<tr>
<td style="background-color:'.$farve.'"><p>
' . $row['udbyder'] . ' '.$_POST['kanaler'].'
</p></td>
</tr>';
}
}