Michael and Curt,
Thank you very much with your time and promptness. You both have been very
helpful.
Kind regards,
Katie
- Original Message -
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Monday, July 26, 2004 1:12 PM
Su
* Thus wrote Katie Marquez:
> Hi!
>
> I did a search of the PHP manual for these:
>
> -> and ::
>
as far as the :: is, its name (in php): The Paamayim Nekudotayim.
Paamayim Nekudotayim would, at first, seem a strange choice for a
double-colon. However, at the time of writing of Zend Engine 0.
Katie Marquez wrote:
> Hi!
>
> I did a search of the PHP manual for these:
>
> -> and ::
>
> I know what they are used for, but what I don't know
> is what they are formally called. Can someone tell me
> what they are called (short of using the symbol in the
> name)?
I don't know what PHP's offic
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;
--Je
In PHP, what does the operator "-=" do?
$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
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 rega
> -Original Message-
> From: Andrew McCombe [mailto:[EMAIL PROTECTED]
> Sent: 27 June 2003 11:18
>
> Can anyone tell me why i'm getting this error?
>
> Fatal error: [] operator not supported for strings in
> c:\inetpub\wwwroot\Iweb-sites\Exp\menu2.php on line 41
>
> [code]:
>
>
> $rst
"Dhaval Desai" <[EMAIL PROTECTED]> wrote:
> what is the use of %
It returns a remainder. For example 7 % 2 = 1.
> Is it called modulo..what is it's use in PHP.?
There are plenty of situations where it's useful. For example, if you're
displaying data in rows and want to shade every other row:
It doesn't have a use in only PHP but in all programming languages.
It's a math thing .. u can get a remainder of a division.
10%8 = 2
12%8 = 4
10%5 = 0
12%5 = 2
Simple application:
$ppl = 23;
$grpsize = 7;
echo ("when $ppl people are divided over groups of $grpsize, ".
$ppl%$grpsize ." people a
9 matches
Mail list logo