Re: newbie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Means you're passing the variable as reference.
This means that any change in the variable inside your function will affect
the variable outside your function, in other terms:

if you have

function myfunc(&$var){
    $var = 5;
}

$a = 6;
myfunc($a);

will result in having $a=5 after the function all.

--
itoctopus - http://www.itoctopus.com
"bob pilly" <bobpilly@xxxxxxxxxxx> wrote in message
news:748909.45030.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi all
>
> Can anyone tell me what '&' means before a var?
>
> e.g function(&$var)
>
> Thanks for any help in advance
>
>
>
>
>
> ___________________________________________________________
> What kind of emailer are you? Find out today - get a free analysis of your
email personality. Take the quiz at the Yahoo! Mail Championship.
> http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux