Re: [PHP] Using variable content to name a class

2006-06-06 Thread Jochem Maas
Dave M G wrote: Chris, Thank you for replying. $object = new $className(); Is this possible? If in doubt, test it out ;) Yes, it will work. Oh, that's actually the code I can use? I just wrote it as an explanatory aid, not thinking that it could be literally done like that. I assumed

[PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
PHP list, I suspect this is a rather basic concept, but I could not find the specifics in the online manual. I have a set of classes, and the name of each class is stored in a column in a table in my MySQL database. When I want to create an object from one of my classes, I also query the

Re: [PHP] Using variable content to name a class

2006-06-05 Thread Chris
Dave M G wrote: PHP list, I suspect this is a rather basic concept, but I could not find the specifics in the online manual. I have a set of classes, and the name of each class is stored in a column in a table in my MySQL database. When I want to create an object from one of my classes, I

Re: [PHP] Using variable content to name a class

2006-06-05 Thread Dave M G
Chris, Thank you for replying. $object = new $className(); Is this possible? If in doubt, test it out ;) Yes, it will work. Oh, that's actually the code I can use? I just wrote it as an explanatory aid, not thinking that it could be literally done like that. I assumed there was a specific