OSv> How can is check with php wether a number is even or not? What i want is OSv> that in a while loop the background color of a cell changes!
Try echo (($i++ % 2) == 0) ? "#FF0000<BR>" : "#00FF00<BR>"; First it performs an integerdivision and checks if the remainder is 0. If that is the case it prints "FF0000" if the remainder is 1 it prints "00FF00" Finally is increments $i. -- Kind regards, Morten Winkler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]