Re[2]: [PHP] Simple: Whats wrong with this?
| From: | Richard Davey | Date: | Wed, 17 Mar 2004 17:12:09 +0000 |
| Subject: | Re[2]: [PHP] Simple: Whats wrong with this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180701@lists.php.net to get a copy of this message | ||
Hello Sam,
Wednesday, March 17, 2004, 5:04:21 PM, you wrote:
SM> This drove me nuts for a while and instead of doing $variable++ I
SM> started using ++$variable and never had the problem again.
Yes, that's a pre-increment operator. Quite different to a
post-increment. You need to use the right one depending if your
variable exists already, etc.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html