ILMV Posted April 24, 2009 Share Posted April 24, 2009 Hello All I have a variable of which stores the name of a class of mine, if the variable contained this string "myclass", how could I use that to load the myclass class? Many Thanks ILMV Link to comment https://forums.phpfreaks.com/topic/155478-instantiate-class-from-string/ Share on other sites More sharing options...
ILMV Posted April 24, 2009 Author Share Posted April 24, 2009 Oh... I didn't need it, I could just do $foo = new $var; Oh well, thanks anyway Link to comment https://forums.phpfreaks.com/topic/155478-instantiate-class-from-string/#findComment-818136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.