Re: [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] Simple question: How to declare Vars in PHP? (I know it's not necessary, but I still
want to know)
| From: | Rasmus Lerdorf | Date: | Thu, 05 May 2005 05:49:45 +0000 |
| Subject: | Re: [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] Simple question: How to declare Vars in PHP? (I know it's not necessary, but I still want to know) |
||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-214485@lists.php.net to get a copy of this message | ||
James Williams wrote:
>>No
>>
>>You don't declare variables in PHP. You just start using them.
>>
>>Perhaps you mean assign? Since your example of
>>
>> var = variableName;
>>
>>is actually an assignment in Javascript.
>>
>>In PHP you simply do:
>>
>> $one_var = $another_var;
>>
>>-Rasmus
>
>
> You are however, when dealing with OOP and classes required to declare
> you're variable, right?
You can, but you don't need to. Try it.
-Rasmus