Re: & infront of variable??

From: Date: Tue, 20 Jun 2000 16:12:54 +0000
Subject: Re: & infront of variable??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2317@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 20.06.00 um 16:53 hat Alan Morey geschrieben: AM>What does the '&' do when it is infront of a variable? AM>eg. &$var AM>i've seen it used in some scripts but i don't know what it's does. $foo = $bar; would make a copy of $bar named $foo $foo = &$bar; would make a reference to $bar, like a pointer in C, I guess. So, if you set $foo = 1, then you actually set $bar = 1. - -- Reg., Jonas Jochum commandline net services - ------------------------------------------------------------------------- tel: 07223-911794 | cmd:~ # Systemadministration, Netzwerkverwaltung fax: 07223-911795 | cmd:~ # Einrichtung von *BSD/Linux-Servern d2 : 0173-5712481 | cmd:~ # Datenbank/Internetprogrammierung jj@commandline.de | cmd:~ # Webdesign www.commandline.de | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (FreeBSD) Comment: Made with pgp4pine iEYEARECAAYFAjlPmAkACgkQF1ki3orczCB3cACeKuzgRyyMomFmqQXYaeGNd4RZ R5UAnReO980XI+CM9/ShH21N0pDGLlPy =EUvM -----END PGP SIGNATURE-----

« previous php.general (#2317) next »