»Craig« sagte am 2002-04-30 um 09:00:33 +0100 :
> I am trying to write an if statement that says if the value $foo is
> divisible by 2 then echo "text"
> 
> i have tried mod but it isnt recognised

if ($foo % 2){
        echo "foo is divisible by 2";
} else {
        echo "it is not";
}

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.iso-top.de      |    Jabber: [EMAIL PROTECTED]
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 6 days 7 hours 12 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to