This might be a very stupid question :P But I found this really interessting:
class SomeClass{
var $var = "this is some text";
function echoVar($name){
echo $this->{$name};
}
}
$class = new SomeClass()
$class->echoVar("var") // will echo "this is some text"
Can I do somethign similar, can I take the value of a string and instantiate a new class with that name? If not, any "almost" solutions?
Thanks