This has been giving me the devil of a time. I want to store a base object in a collection object's variable which is an array.
IE:
class tire{
var tid;
var tsize;
}
class tires{
var tirecollection;
function tires{
$ctire = array();
//Make a dbcall
//For each tire returned create a new tire object and add it to the array
//Finally assign the array to the $this->tirecollection var.
}
$foo = new tires;
//This does not return an object:
$bar = $foo->tirecollection[0];
If I serialize the object before placing it into the tirecollection it works fine. However, if I return a recordset of over 7,000 rows I top the 8m memory when the actual data I'm storing in each object is very small.