Re: Object/Class problem
| From: | Steve Cayford | Date: | Wed, 17 Oct 2001 15:37:59 +0000 |
| Subject: | Re: Object/Class problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71344@lists.php.net to get a copy of this message | ||
You want to use $test->v1 not $test->$v1.
-Steve
On Wednesday, October 17, 2001, at 10:18 AM, Jürgen wrote:
Hello, I have a really stupid problem, can anybody explain me why this code doesn't work? The output on the website is "worldworld" in stead of "hello world". Why? Thanks, J¸rgen Sturm $test = new Test(); $test->$v1 = "hello "; $test->$v2 = "world"; echo $test->$v1 . $test->$v2; class Test { var $v1, $v2; } -- 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