I am a bit new to PHP, I am trying to create away to sort kills,points,deaths,userid. I did try googleing but did not really get it.
Any help wold be appreciated.
text file to the code -> http://www.l3git.com/servers/test_2.txt
before the php code does its thing -> -> http://www.l3git.com/servers/users
what it looks like on an output -> http://www.l3git.com/servers/test_2.php
[php]
<? $i = 0; $taken = 0; $e = 0; $type = $_GET['type']; list($type,$step2,$step3,$step4,$step5) = split(";",$type); if($step2 < "0"){$step2 = "25";} if($step3 < "0"){$step3 = "0";} if($step2 > "200"){$step2 = "200"; echo ' <table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="l3_name-title">UserName</td>
<td class="l3_rank-title">Rank</td>
<td class="l3_class-title">Class</td>
<td class="l3_kills-title">Kills</td>
<td class="l3_kia-title">Deaths</td>
<td class="l3_points-title">Points</td>
<td class="l3_time-title">Time</td>
<td class="l3_visits-title">Visits</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<?
foreach($result as $value){
list($UserId, $CharacterId, $Name, $Rank, $Class, $Kills, $Deaths, $Points, $TotalTime, $TotalVisits) = split(',',$value);
if(($Class == "NULL") || ($Rank == "-1") || ($TotalTime == "0")){$e++;}
if ($i++-1>=$step3 && $taken++<$step2){
if(($Class == "NULL") || ($Rank == "-1") || ($TotalTime == "0")){}
else{
?>
<tr>
<td width="25" style="text-align:center; border-right:#000 thin solid;"><?=$i-1?></td>
<td class="l3_name"><a href="#<?=$UserId?>/<?=$CharacterId?>"><?=$Name?></a></td>
<td class="l3_rank"><?=$Rank?></td>
<td class="l3_class"><?=$Class?></td>
<td class="l3_kills"><?=$Kills?></td>
<td class="l3_kia"><?=$Deaths?></td>
<td class="l3_points"><?=$Points?></td>
<td class="l3_time"><?=$TotalTime?></td>
<td class="l3_visits"><?=$TotalVisits?></td>
</tr>
<?
if($taken == $step3){break;}
}
}
}
echo '</table>';
echo ' | Failed players:'.$e;
[/php]
Thank you for your time.