Moin,
Mal seh'n, ob noch jemand anderes ne Idee hat.
Wie geht's denn weiter? case 5000: $lvlup=11; break; ... ? ;-) Will sagen: Gibt es denn wirklich _gar keine_ Regelmäßigkeit die du zur Berechnung ranziehen kannst?
Du kannst dir ja noch mit einer Schleife behelfen, das ist dann ggbf. etwas langsamer.
$a = Array(0, 100, 500, 1000, 1500, 2000, 2500, ....);
$lvlup = 0; while($a[++$lvlup]<=$charexp && $lvlup<10);
--
Henryk Plötz
Grüße aus Berlin
~~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~~
~~ Help Microsoft fight software piracy: Give Linux to a friend today! ~~
Henryk Plötz
Grüße aus Berlin
~~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~~
~~ Help Microsoft fight software piracy: Give Linux to a friend today! ~~