RE: [PHP] How to call method from another class
| From: | Sandeep Murphy | Date: | Mon, 28 Jan 2002 19:12:58 +0000 |
| Subject: | RE: [PHP] How to call method from another class | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82457@lists.php.net to get a copy of this message | ||
first create an instance of class B like this...
$test = new classB();
Now, u can refer to any function or method of classB like this:
$test->hello(); // where hello() is a method of classB..
cheers,
sands
-----Original Message-----
From: David Yee [mailto:david@coolcomputing.com]
Sent: segunda-feira, 28 de Janeiro de 2002 17:19
To: php-general@lists.php.net
Subject: [PHP] How to call method from another class
If I have a PHP class (let's say it's called ClassA), how do I call a method
from another class (ClassB) within ClassA? Thanks.
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net