Is there a way to decrease a number by 1?
Yes, and it's called the decrement operator, much as ++ is the increment operator. Intuitive, huh? 😉
haha, i'm just being lazy. then how come "--" dont work?
i = i - 1;
Actualy there is also "--$a" more info on http://www.php.net/manual/en/language.operators.increment.php
Originally posted by Quest haha, i'm just being lazy. then how come "--" dont work?
Well, it does work, so I'd have to guess PBKAC, although I don't wish to be mean about it...
<? $y=50; $y--; echo $y; // prints "49" on all my servers... ?>
Whats PBKAC?
Originally posted by paulnaj Whats PBKAC?
That's another fancy new acronym from dale, wonder what it could mean?
Hmm, that's funny; I'm pretty sure I learned it here, but I possibly typed it incorrectly. Here's the actual definition from the Jargon File ...
Off to figure out the issue...
Yeah, I left out an "E" ... here's the original, historical, archaic thread ...
And, FWIW, I did NOT use the term with any 'derogatory' intent...
dalecosp
semi-resident phpbuilder historian :rolleyes: