is there a way in php
to declare a class using a variable
ie (this doesnt work - but its here to give you an idea of my intention):
$myname = "the_class";
class $myname {
...
}
i also tried:
define("MYNAME","the_class");
class MYNAME{
...
}
and i tried:
$myname = "the_class";
class $$myname {
...
}
this doesnt really help:
http://php.net/manual/en/language.variables.scope.php
nor does this:
http://us3.php.net/manual/en/keyword.class.php
thanks very much for your help
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…