Re: Simple: Whats wrong with this?
| From: | Red Wingate | Date: | Wed, 17 Mar 2004 17:14:51 +0000 |
| Subject: | Re: Simple: Whats wrong with this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180699@lists.php.net to get a copy of this message | ||
Maybe you guys should take a read about pre- and post-increment :-)
Sam Masiello wrote:
This drove me nuts for a while and instead of doing $variable++ I started using ++$variable and never had the problem again. --Sam Jake McHenry wrote:No. $correct++; Is all you need for the second condition, it automatically sets itself back.Does this always work? In my timesheet app, I have to do $counter = $counter + 1, because for some reason the $counter++; doesn't work. It just + doesn't work, no incrementation of the variable. Is there something in php.ini that can prohibit this from working? Thanks, Jake