I'm making a generic php class which autoloads values into an object from a Database
To set properties I use this:
$object->$propertyName = $valueFromDB;
where the value of propertyName is comes from the mysql field name..
Now I want to push something onto an array in a similar fashion:
This works..
$object->$arryName = array();
But this doesn't..
$object->$arryName[] = "test";
How can I work around this?