note 76571 added to language.expressions
| From: | george dot langley at shaw dot ca | Date: | Fri, 20 Jul 2007 18:01:47 +0000 |
| Subject: | note 76571 added to language.expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128776@lists.php.net to get a copy of this message | ||
Here's a quick example of Pre and Post-incrementation, in case anyone does feel confused (ref
anonymous poster 31 May 2005)
<?PHP
echo "Using Pre-increment ++\$a:<br>";
$a = 1;
echo "\$a = $a<br>";
$b = ++$a;
echo "\$b = ++\$a, so \$b = $b and \$a = $a<br>";
echo "<br>";
echo "Using Post-increment \$a++:<br>";
$a = 1;
echo "\$a = $a<br>";
$b = $a++;
echo "\$b = \$a++, so \$b = $b and \$a = $a<br>";
?>
HTH
----
Server IP: 216.235.15.211
Probable Submitter: 68.145.109.125
----
Manual Page -- http://www.php.net/manual/en/language.expressions.php
Edit -- https://master.php.net/note/edit/76571
Del: integrated -- https://master.php.net/note/delete/76571/integrated
Del: useless -- https://master.php.net/note/delete/76571/useless
Del: bad code -- https://master.php.net/note/delete/76571/bad+code
Del: spam -- https://master.php.net/note/delete/76571/spam
Del: non-english -- https://master.php.net/note/delete/76571/non-english
Del: in docs -- https://master.php.net/note/delete/76571/in+docs
Del: other reasons-- https://master.php.net/note/delete/76571
Reject -- https://master.php.net/note/reject/76571
Search -- https://master.php.net/manage/user-notes.php