How can I combine the following into one statment?
ThanksPHP Code:$tableCreator = new tableCreator;
$table = $tableCreator->createJSTable();
Printable View
How can I combine the following into one statment?
ThanksPHP Code:$tableCreator = new tableCreator;
$table = $tableCreator->createJSTable();
Don't think you can. First line creates an instance of an object, the second uses that new object to call a method which creates another object.
-tg
as techgnome said, you cant. Why do you want to do this?
im a lazy bastard.
that is a terrible reason. It is 1 extra line...
Answer to original question: no.
This?
PHP Code:$table = tableCreator::createJSTable();
Thanks!