Re: how to assign a value to a variable inside a class
| From: | Eduardo Raúl Galván Sánchez | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: how to assign a value to a variable inside a class | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233761@lists.php.net to get a copy of this message | ||
Check the overloading methods (__get and __set) for PHP 5.x:
http://www.php.net/manual/en/language.oop5.overloading.php
Merlin escribió:
Hi there, I would like to assign a value inside a class like this: var $db_username = $old_name; Unfortunatelly this does not work and I do get following error: Parse error: syntax error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' Thank you for any hint on how to place a correct syntax on this. Merlin