I want to create an Object in PHP using, as element, a list of fields taken from an array list obtained from a function outside the class. I need to do that dinamically, cause I have to compile the array from a DB and this list of data could change. Is this possible? I've a function called:
public $classKeyword = "contratti";
public $arrayList = getDbTableStructure($classKeyword);
And this function return me the array list and I'll cicle it to build the object. This function work in all other the project (not using class), but seems not working if I call it from a class... I'm losing something?