I'm probably asking the question badly, so I'm going to give an example. I have a class that is something similar to this:
class myclass {
var $template = array();
var $record = array();
function __construct($template,$record) {
$this->template = ( set = to a database response here );
$this->record = ( set = to a database response here );
}
My issue is when using this object, the template should always be the same, and the record is what changes for each instance of the object. Is there a way to have the value for $template carry over to each new instance? Something like
$a = new myclass(1,500);
$b = new myClass(2);
Where b has the value for $this->template
that was already generated when creating $a. Maybe I'm approaching this from the wrong angle entirely. Any suggestions appreciated.