<?php
    for ($x = 0; $x < 10; $x += 2)
        echo $x.',';
?>

m.

Henri Marc wrote:
Hello,

I woudlike to use a loop:

for ($i=1;$i<11;$i++)

But instead of incrementing with 1, I would like to
increment by 2. So $i would be 1,3,5,7,9. I tried to
find the answer may be with "step" but couldn't find
anything.

Thank you for your help.

Dave





Vous manquez d’espace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/


Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer 
instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com


-- Miroslav Hudak developer & designer http://hudak.info

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



Reply via email to