Jump to content

Getting the name of a variable in a string


Ge64

Recommended Posts

Hi,

Is there a function that returns the name of the variable? Like:

[code]$variable_name = varname($somevariable);
//$variable_name == "somevariable"[/code]

The other way around would also work, like:

[code]$somevariable = variable('variable_name');
//$somevariable == $variable_name[/code]

Or is there any other way to get that? Thanks already :P

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.