Quote:
Originally Posted by phpdoctor
You have: new test2();
You need to put this into a variable or return it: $object = new test2();
Are you wanting to have test1 connect to test2?
(Untested)
Notice im using __construct() instead of the class name...
This is a php5 thing: http://nz2.php.net/manual/en/language.oop5.php
Any questions?
Lex
|
nope i'm not trying to extend the class. i was under the impression that i could not have a class written and instantiate inside a method of another class, but i tested the code and i didnt get any errors, i just wanted to know if the syntax was correct, also i dont necessarily want to use it in the __construct
function i just used the class name same as the function as the example. thanks though