|
Posted by Mladen Gogala on 08/10/06 14:49
On Wed, 09 Aug 2006 20:11:15 -0700, Russ.Dilley wrote:
> I have an embarrassingly easy PHP question. I have the following line
> of code:
>
> $n *= $s = count($data[$i]);
>
> Where $data is an array and $n and $s are scalars.
>
> I'm familiar with the '*=' operator:
>
> $n = $n * $s
>
> But I'm not sure what the second '=' is doing.
>
Looks fine to me:
$ php -r '$data=array(1,2,3);$n=2; $n *= $s = count($data); print "N=$n\n";'
N=6
$
--
http://www.mgogala.com
Navigation:
[Reply to this message]
|