Moin,
Jep.
$nummer = floor($number/$anzahl)*$anzahl;
Naja, damit zieht man sich aber evt. Genauigkeitsprobleme mit Fließkommazahlen (Marke 15,000000001) zu. Einfacher und vielleicht auch schöner anzusehen ist da doch der modulo: $nummer = $number - $number % $anzahl
--
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! ~~