Well, I didn't want to ask, but I couldn't find a good example of this...
Is something like this what you are takling about?
class Container
{
var $names = array();
function AddContainer($new_objname)
{
array_push($names, $new_objname);
}
}
class Data extends Container
{
ALL SPECIFIC FUNCTIONS GO HERE
}
To use this:
when I start a new set of objects:
$set = new Container;
For all the objects, I would Do the query that gets the data for the new object and create the new Data object:
$new_dataname = 'a_7' -- a_7 would come from the database
$new_dataname = new Data;
$new_dataname->AddContainer($new_dataname);
The above would create 3-10 objects, and push the name of the object into the $names array above.
Then, to see the list of object names:
foreach($set->names[] as $temp)
{
echo $temp;
}
Is that "proper"?