Jump to content

Convert ($this -> variableName) to ($variableName) ??


NeoMarine

Recommended Posts

Is it possible to convert $this -> variableName to $variableName?

 

I want to somehow loop through all the variables in scope (get_defined_vars()) and have the variables set in as $variableName so I can then just type:

 

echo $variableName

 

instead of

 

echo $this->$variableName

 

thanks

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.