Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- instanciate class from array
June 25, 2007, 2:35 pm
rate this thread
I'm searching a way to instanciate php5 class which names are
contained in a array.
$class_name = myArray['class'] ;
$object = new $class_name()... of course, this syntax won't work..
that was just to explain :)
I use the magic __autoload function to include required classes, but I
can't find a way to instanciate a class from a string contained in a
any idea ?
thanks a lot :)
- » functions for sorting/paging functionality for imap mailboxes
- — Previous thread in » PHP Scripting Forum