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_c
Sure, use php to write to a file with the name you want, then require that file. You could also use eval, e.g. something like: eval("class $myname { ... };");
eval("class $myname { ... };");
For more complicated cases, use a library such as Zend's CodeGenerator (example here).