Ok if you understand PHP then you will understand this explaination.
I called for all the Arrays and turned them into variables.
$rankmax1 = "150";
$rankmax2 = "500";
$rankmax3 = "800";
$rankmax4 = "2500";
$rankmax5 = "5000";
$rankmax6 = "8000";
$rankmax7 = "20000";
$rankmax8 = "20000";
$rankmax9 = "50000";
$rankmax10 = "50000";
$rankmax11 = "250000";
$rankmax12 = "200000";
$rankmax13 = "500000";
$time = number_format($time/3600, 2);
$spm = number_format($spm, 2);
if ($rank == '0') {
$progress = Round(($score / $rankmax1) * 100, 2) . "%";
} else if ($rank == '1') {
$progress = Round(($score / $rankmax2) * 100, 2) . "%";
} else if ($rank == '2') {
$progress = Round(($score / $rankmax3) * 100, 2) . "%";
} else if ($rank == '3') {
$progress = Round(($score / $rankmax4) * 100, 2) . "%";
} else if ($rank == '4') {
$progress = Round(($score / $rankmax5) * 100, 2) . "%";
} else if ($rank == '5') {
$progress = Round(($score / $rankmax6) * 100, 2) . "%";
} else if ($rank == '6') {
$progress = Round(($score / $rankmax7) * 100, 2) . "%";
} else if ($rank == '7') {
$progress = Round(($score / $rankmax8) * 100, 2) . "%";
} else if ($rank == '8') {
$progress = Round(($score / $rankmax9) * 100, 2) . "%";
} else if ($rank == '9') {
$progress = Round(($score / $rankmax10) * 100, 2) . "%";
} else if ($rank == '10') {
$progress = Round(($score / $rankmax11) * 100, 2) . "%";
} else if ($rank == '11') {
$progress = Round(($score / $rankmax12) * 100, 2) . "%";
} else if ($rank == '12') {
$progress = Round(($score / $rankmax13) * 100, 2) . "%";
}
Notice in my original script, i called like $time = $stats['TIME'] Basicly making $time the variable for each time i wanted to call that. This goes for $rank $score and so on.
By the way thank you for the polite comment on mine, but it wouldnt be; if not for chuy.
Last edited by aTi|Sanders (2005-10-26 02:53:57)