Let's say we have the class:
class foo
{
var bar1;
var bar2;
function foo()
{
statement1;
statement2;
}
}
How would I instantiate an array of classes? So I could access them by:
echo array_name[$unique_id][$foo->bar1];
For example -- not sure if that syntax is correct. And when it's instantiated into the array, with each new elemented added, will the constructor function get executed?
Also, if I were done with an instance of a class in the array, is there a way to destroy that instance to free the memory?