[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: Re: [PHP] Passing constructor values to functions in a class
From: Curt Zirzow <php-general () zirzow ! dyndns ! org>
Date: 2003-10-31 3:59:05
[Download RAW message or body]
* Thus wrote Terence (terence@sunway.edu.my):
> Dear List,
>
> I've been struggling with this for some time now and can't for the life of
> me figure out why the output is "GeorgeGeorge" and not "GeorgeBush"
>
> <?php
> class StaffDetails {
>
> var $staff_name;
> var $staff_surname;
>
> function StaffDetails() {
>
> $this->$staff_name="George";
syntax is:
$this->staff_name="George";
(note: no $ before the class variable)
Curt
--
"My PHP key is worn out"
PHP List stats since 1997:
http://zirzow.dyndns.org/html/mlists/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic