Re: How to call method from another class
| From: | David Yee | Date: | Mon, 28 Jan 2002 20:08:16 +0000 |
| Subject: | Re: How to call method from another class | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82463@lists.php.net to get a copy of this message | ||
Got it- thanks Sandeep.
David
----- Original Message -----
From: "Sandeep Murphy" <Sandeep.Murphy@oni.pt>
To: "'David Yee'" <david@coolcomputing.com>;
<php-general@lists.php.net>
Sent: Monday, January 28, 2002 11:12 AM
Subject: RE: [PHP] How to call method from another class
>
> 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
>