Re: [PHP] Passing constructor values to functions in a class

2003-10-30 Thread Curt Zirzow
* Thus wrote Terence ([EMAIL PROTECTED]): > 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" > > class StaffDetails { > > var $staff_name; > var $staff_surname; > > function StaffD

Re: [PHP] Passing constructor values to functions in a class

2003-10-30 Thread David Otton
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

[PHP] Passing constructor values to functions in a class

2003-10-30 Thread Terence
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" $staff_name="George"; $this->$staff_surname="Bush"; } function StaffName() { echo $this->$staff_name; } function StaffSurname() { ech