I'm just trying to illustrate my question here, so please don't nit-pick about the crude programming 😉
I've got a class that's creating new instances of other classes inside it. My question is, how do I call a function from the subclass in the main class?
class Form
{
function Form()
{
$subform = new SubForm();
}
function maxFieldSize()
{
return 47;
}
}
class SubForm
{
function SubForm()
{
$size = parent::maxFieldSize();
return "<input type=text size=".$size.">";
}
}