Re: clases and variables
| From: | Lars Torben Wilson | Date: | Tue, 31 Oct 2000 21:34:56 +0000 |
| Subject: | Re: clases and variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23014@lists.php.net to get a copy of this message | ||
Martin A. Marques writes:
> Is it posible to use a variable inside a class which is not defined inside
> the class?
>
> class something {
>
> var var1;
>
> function instance1 {
> if (var1) {
> var2 = false
> }
> }
> }
>
>
> Is this posible?
Yes--but remember that you need to use '$' signs on the variables.
You did try this before posting the question, right? :)
--
+----------------------------------------------------------------+
|Torben Wilson <torben@php.net> Netmill iTech|
|http://www.coastnet.com/~torben http://www.netmill.fi|
|Ph: 1 250 383-9735 torben@netmill.fi|
+----------------------------------------------------------------+