Can someone tell me an easy/quick/clean way of checking if a variable is divisible by 1000? (or any number for that matter.)
Thanks
Jamie
<? if ($number%1000<1) { echo "$number is divisible"; } ?>
Thanks, mate, but what does the '%' mean ??
That's the mighty Modulus! It provides the remainder from a division.
You can read up on operators here: http://www.php.net/manual/en/language.operators.php
thanks, works great now.