note 32653 added to language.references

From: Date: Tue, 03 Jun 2003 21:33:55 +0000
Subject: note 32653 added to language.references
Groups: php.notes 
Request: Send a blank email to php-notes+get-49661@lists.php.net to get a copy of this message
a simple example : function my_func($a,$b,$c) { $a = $b+$c; } $i = 1; $j = 2; $k = 3; my_func($i,$j,$k); print "$i,$j,$k"; this will print 1,2,3 and not 5,2,3. to make it work references to the rescue : function my_func(&$a,$b,$c) { $a = $b+$c; } Hope will help somebody. ---- Manual Page -- http://www.php.net/manual/en/language.references.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32653 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32653&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32653&report=yes

« previous php.notes (#49661) next »