Possible Duplicate:
PHP namespace with Dynamic class name
How to declare class from string?
code
$name = 'the_class';
require_once $name.'.php';
$class = new \resource\$name();
error
Parse error: syntax error, unexpected '$name' (T_VARIABLE), expecting identifier (T_STRING)
★resource★classname()would be much cooler.$class = new Resource.Classname();be an issue unless it was a shortcoming of the compiler? There's no ambiguity because the.could never work for concatenation in that context (right?). Just some thoughts - I'm sure there's a reason, it's really over my head, and I've gotten used to the backslash and almost like it now.