View Single Post
  #5 (permalink)  
Old 01-09-2007, 09:58 AM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 389
DaveSawers RepRank 1
Default

Quote:
Originally Posted by montyauto
Is there any function to get the name of a variable based on its value?

Any languange please, php, perl, phyton whatever that don't make you mad.
Basically, no.

It would surely be nonsensical to do so. Lets say you had some code that ended up with:

x=3
y=2
z=3

and you asked for the name of a variable with a value of 3. What would you expect to get? And what would you do with the result anyway?

Perhaps if you describe what it is you are trying to do at a higher level, you will get a meaningful response that will show you how to achieve the end result you want without having to find which variables have values.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote