Bryc3
05-14-2006, 02:37 AM
What is the PHP symbol or function to tell if something is a decimal when divisable by 2.
http://www.hypedtourneys.com/php.phps
http://www.hypedtourneys.com/php.phps
![]() | View Full Version : Php Bryc3 05-14-2006, 02:37 AM What is the PHP symbol or function to tell if something is a decimal when divisable by 2. http://www.hypedtourneys.com/php.phps Mark S 05-14-2006, 02:41 AM Like in Java, it is the percent sign, the modulo operator. The modulo operator reports the remainder of the division problem. So if it 'returns' 0, then the two numbers can be divided and the quotient is a whole number (no decimals) Bryc3 05-14-2006, 02:50 AM http://www.hypedtourneys.com/php.phps I get an error with that code. :( laserlight 05-14-2006, 02:55 AM It should be: $row['id'] % 2 == 0 slippyfist 05-14-2006, 03:01 AM it shuld be $row['id' % 2 == 0 Bryc3 05-14-2006, 03:18 AM Thank you very much. slippyfist 05-14-2006, 11:34 AM Any time ;D |