Declaring variable as PHP class
Posted
by iamdadude
on Stack Overflow
See other posts from Stack Overflow
or by iamdadude
Published on 2010-06-12T03:16:02Z
Indexed on
2010/06/12
3:22 UTC
Read the original article
Hit count: 269
I have a variable called $theclass and it's a string "Home_class". How can I define a class out of that string? The reason I need to do this is that the variable will change and I want to be able to declare the class that the variable is equal to. Is this possible?
Thanks for any help.
© Stack Overflow or respective owner