On Fri, March 9, 2007 4:27 am, Cefull Lo wrote:
> Hi everyone,
> Is there any function that return the name of the variable??
> i.e.
>
> $foo='abc';
> $bar=somefunc($foo); // $bar='foo' here

No.

And there cannot be, as any given variable could have multiple
references and be passed around through several functions, getting a
different name each time.

You probably should be putting 'foo' and 'abc' into an array instead.

$foobar['foo'] = 'abc';

You can then address 'foo' and 'abc' with various array functions.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to