note 105844 added to language.operators.arithmetic
| From: | mdanielsondotnet at osu1 dot php dot net | Date: | Mon, 19 Sep 2011 21:59:57 +0000 |
| Subject: | note 105844 added to language.operators.arithmetic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183280@lists.php.net to get a copy of this message | ||
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 />';
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 96.55.241.128
----
Manual Page -- http://www.php.net/manual/en/language.operators.arithmetic.php
Edit -- https://master.php.net/note/edit/105844
Del: integrated -- https://master.php.net/note/delete/105844/integrated
Del: useless -- https://master.php.net/note/delete/105844/useless
Del: bad code -- https://master.php.net/note/delete/105844/bad+code
Del: spam -- https://master.php.net/note/delete/105844/spam
Del: non-english -- https://master.php.net/note/delete/105844/non-english
Del: in docs -- https://master.php.net/note/delete/105844/in+docs
Del: other reasons-- https://master.php.net/note/delete/105844
Reject -- https://master.php.net/note/reject/105844
Search -- https://master.php.net/manage/user-notes.php