I was hoping someone could help me with my problem. I have been reading over the PHP manual, but cannot find the answer to my question.
I need to get the variable name of a declared class. For example, I need to be able to do something such as:
$MyNewClassObject = new SideBar; $MyNewClassObject->getVarName ();
getVarName should return "MyNewClassObject";
I thought I had found the answer with [!--coloro:#33CC00--][span style=\"color:#33CC00\"][!--/coloro--]__CLASS__[!--colorc--][/span][!--/colorc--] and [!--coloro:#000099--][span style=\"color:#000099\"][!--/coloro--]get_class()[!--colorc--][/span][!--/colorc--], but that only returns the class name, not the variable it is declared under.
Thanks for your help!