[PHP] Operator question

2003-12-09 Thread Jeff McKeon
In PHP, what does the operator -= do? I can't find a ref to it's function in the online manual or any books I have. Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Operator question

2003-12-09 Thread Richard Davey
Hello Jeff, Tuesday, December 9, 2003, 4:11:10 PM, you wrote: JM In PHP, what does the operator -= do? I can't find a ref to it's JM function in the online manual or any books I have. Set's a negative value: $a = 10; $b -= $a; or $b -= 10; In both cases $b will equal -10. -- Best

Re: [PHP] Operator question

2003-12-09 Thread Matt Matijevich
snip In PHP, what does the operator -= do? /snip $var -= 1 is the same as $var = $var - 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Operator question

2003-12-09 Thread Jeffrey Labonski
Uhhh, nope. That only works in your code if $b is initially 0. They're shorthand for do something and reassign. $a = 100; $a += 10; // $a = $a + 10 $a -= 10; // $a = $a - 10 $a /= 10; // etc... $a += 10; $a = 2; $a .= ' is a weird number'; $mode = 0755; $mode = 01; --Jeff