Barguast Posted July 10, 2007 Share Posted July 10, 2007 If I have the name of a class stored in a variable: $classname = "Page"; How can I then create an instance of the class? Is it possible? Thanks for any help! Quote Link to comment Share on other sites More sharing options...
trq Posted July 10, 2007 Share Posted July 10, 2007 <?php $classname = "Page"; $obj = new $classname; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.