Posted by Steve on 02/24/07 00:36
<comatose> wrote in message
news:m3uut2t6kggs59nhm6j6v0anl6bi5j77ni@4ax.com...
| Newbie here:
| can anyone help me, i've been beating my brain on this one.
| how can i sort from highest to lowest for $player_wins[$i] ??
|
|
|
|
| echo "<table width='300' border='1' cellspacing='0' cellpadding='2'
bgcolor='#FBFFC6'>";
| echo "<tr><th width='180'>Player</th><th width='40'>Won</th><th
width='40'>lost</th><th
| width='40'>Avg.</th>";
| for($i=0;$i<=$counter;$i++){
| if ($player_name[$i] != ""){
| $avg = ($player_wins[$i]/($player_wins[$i]+$player_loss[$i]));
| echo
|
"<tr><td>".$player_name[$i]."</td><td>".$player_wins[$i]."</td><td>".$player_loss[$i]."</td><td>".round($avg,3)."</td></tr>";
| }
| }
| echo "</table>";
HOLY FUCK !!! RTFM !!!!
Navigation:
[Reply to this message]
|