Re: What does &var mean ?

From: Date: Thu, 22 Nov 2001 17:18:29 +0000
Subject: Re: What does &var mean ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75529@lists.php.net to get a copy of this message
It indicates that the variable was passed by reference rather than by value. Fred Girish Nath <girishn@btinternet.com> wrote in message news:000f01c1736c$714abc30$015b10ac@AERIS... > 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 >

« previous php.general (#75529) next »