Re: Variable names

From: Date: Tue, 02 Apr 2002 14:12:29 +0000
Subject: Re: Variable names
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-91133@lists.php.net to get a copy of this message
> function somefunction($myvar) { > do something... > ... > ... > return \$myvar; > } > > $varname = somefunction($myvar); > echo "$varname"; That won't work, because you escaped the $ sign, the variable won't get processed and the name returned will be the one of the variable as it is declared in the function, always the same.

« previous php.general (#91133) next »