note 107500 deleted from control-structures.for by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 20:56:15 +0000 |
| Subject: | note 107500 deleted from control-structures.for by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187849@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Regarding [eduardofleury at uol dot com dot br 14-Jun-2007 06:18]; here's a slightly more
compact form of your program (excluding the demonstration of $p and its use as a
variable-by-reference):
<?php
//this is a different way to use the 'for'
//Essa é uma maneira diferente de usar o 'for'
for($i = $x = $z = 1; $i <= 10; $z = ++$i + $x+=2){
print "\$i = $i , \$x = $x , \$z = $z <br />";
}
?>