silkfire Posted March 29, 2013 Share Posted March 29, 2013 How do I get a static variable dynamically? I'm trying this but getting the dreaded PAAMAYIM error: foreach($this->entity::$dialog_data as $property) { Should result in Company::$dialog_data because $this->entity contains the string 'Company'. Link to comment https://forums.phpfreaks.com/topic/276287-get-static-variable-dynamically/ Share on other sites More sharing options...
Barand Posted March 29, 2013 Share Posted March 29, 2013 try $ent =$this->entity; foreach($ent::$dialog_data as $property) { Link to comment https://forums.phpfreaks.com/topic/276287-get-static-variable-dynamically/#findComment-1421788 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.