Ge64 Posted December 18, 2006 Share Posted December 18, 2006 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 Quote Link to comment Share on other sites More sharing options...
trq Posted December 18, 2006 Share Posted December 18, 2006 Nope. Quote Link to comment Share on other sites More sharing options...
Ge64 Posted December 18, 2006 Author Share Posted December 18, 2006 ??? Why not :-[ Edit:Someone on another forum pointed me to [url=http://us3.php.net/manual/en/language.variables.variable.php]variable variables[/url]. Thats exactly what I need :) thanks anyway Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted December 18, 2006 Share Posted December 18, 2006 But that's not what you asked about...Ken Quote Link to comment Share on other sites More sharing options...
Ge64 Posted December 18, 2006 Author Share Posted December 18, 2006 Well not exactly but it does do something similar, that's why I said 'or any other way to do that'. Well maybe I should have posted more about what I'm trying to accomplish Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 18, 2006 Share Posted December 18, 2006 dont get it are you trying to get somthink to happen when a varable name is called but you want the varable within the code to exec.you need to use functions ok to call a varable within it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.