Re: Passing constructor values to functions in a class
| From: | David Otton | Date: | Fri, 31 Oct 2003 04:03:43 +0000 |
| Subject: | Re: Passing constructor values to functions in a class | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-168210@lists.php.net to get a copy of this message | ||
On Fri, 31 Oct 2003 11:38:47 +0800, you wrote:
>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"
> $this->$staff_name="George";
Try this instead
> $this->staff_name="George";
(superfluous $). Same goes for the other 3 instances. Sometimes it just
takes a fresh pair of eyes.
If you had your error reporting level set to E_ALL, you would have got a
(somewhat cryptic) notice.