note 105844 deleted from language.operators.arithmetic by danbrown
| From: | danbrown@php.net | Date: | Mon, 19 Sep 2011 22:05:41 +0000 |
| Subject: | note 105844 deleted from language.operators.arithmetic by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-183281@lists.php.net to get a copy of this message | ||
Note Submitter: mdanielson dot net
----
to: milespickens+php at gmail dot com
A simpler way
<?php
for ($x=0; $x<14; $x++) {
// Though 0 is technically divisible by any number, your
// output seems to want to avoid that situation
if ( $x % 3 == 0 && $x != 0 ) {
echo $x . ' is divisible by 3 <br />';
}
}
?>