----- Original Message ----- From: Nayco_IUT Laroche <[EMAIL PROTECTED]> To: Girish Nath <[EMAIL PROTECTED]> Sent: Thursday, November 22, 2001 4:59 PM Subject: Re: [PHP] What does &var mean ?
> This is a reference to the variable, that means that it extends the scope of > this variable into the function, ie, you can modify this variable inside the > function ... OK, OK, my english is bad so maybe you didn't understand > anything .... Well, I tried ;~) !!! > In fact, &var is THE ADDRESS of var .... > > ----- Original Message ----- > From: Girish Nath <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, November 22, 2001 4:43 PM > Subject: [PHP] What does &var mean ? > > > > Hi > > > > I've been looking at some classes an have come across this notation for > > example : > > > > function remove(&$productid) { > > /* this function will remove a given product from the cart */ > > if (isset($productid)) { > > unset($this->items[$productid]); > > } > > } > > > > > > What does the "&" (ampersand) before the variable name mean ? > > > > Thanks > > > > > > Girish > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]