Re: [PHP] Easier way to get the name of a variable?

2006-08-16 Thread Richard Lynch
On Tue, August 15, 2006 7:01 pm, Larry Garfield wrote: On Tuesday 15 August 2006 16:50, Richard Lynch wrote: If the names are not predictable, the array solution is probably best, as there is movement in the PHP Internals list that may (or may not) make it impossible to dynamically add a

[PHP] Easier way to get the name of a variable?

2006-08-15 Thread Chris W. Parker
Hello, After some intense searching of Google I found one example at http://us2.php.net/language.variables on how to get the name of a variable. But it looks pretty expensive. ?php function vname($var, $scope=false, $prefix='unique', $suffix='value') { if($scope) $vals = $scope; else

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread Richard Lynch
On Tue, August 15, 2006 1:19 pm, Chris W. Parker wrote: After some intense searching of Google I found one example at http://us2.php.net/language.variables on how to get the name of a variable. But it looks pretty expensive. ?php function vname($var, $scope=false, $prefix='unique',

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread Robert Cummings
On Tue, 2006-08-15 at 16:50 -0500, Richard Lynch wrote: If the names are not predictable, the array solution is probably best, as there is movement in the PHP Internals list that may (or may not) make it impossible to dynamically add a property to an object. Yikes!! Do you remember the

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread David Tulloh
Chris W. Parker wrote: Hello, After some intense searching of Google I found one example at http://us2.php.net/language.variables on how to get the name of a variable. But it looks pretty expensive. snip Anyone aware of a simple language construct(?) that can do this? I'm on PHP

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread Richard Lynch
On Tue, August 15, 2006 5:05 pm, Robert Cummings wrote: On Tue, 2006-08-15 at 16:50 -0500, Richard Lynch wrote: If the names are not predictable, the array solution is probably best, as there is movement in the PHP Internals list that may (or may not) make it impossible to dynamically add a

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread Larry Garfield
On Tuesday 15 August 2006 16:50, Richard Lynch wrote: If the names are not predictable, the array solution is probably best, as there is movement in the PHP Internals list that may (or may not) make it impossible to dynamically add a property to an object. I've lost track of where that

Re: [PHP] Easier way to get the name of a variable?

2006-08-15 Thread Robert Cummings
On Tue, 2006-08-15 at 19:01 -0500, Larry Garfield wrote: On Tuesday 15 August 2006 16:50, Richard Lynch wrote: If the names are not predictable, the array solution is probably best, as there is movement in the PHP Internals list that may (or may not) make it impossible to dynamically add