passing variables to object
| From: | Oleg Timofeyev | Date: | Fri, 21 Jul 2000 09:34:43 +0000 |
| Subject: | passing variables to object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-7534@lists.php.net to get a copy of this message | ||
Hi I have a problem with one of the objects, when I pass more than one
variable to the object and than try to access it I am only able to get the
last one.
Object is this:
class information
{
var $user,$first;
function counselor_information($user_id,$first_name)
{
$this->$user = $user_id;
$this->$first = $first_name;
}
function get_userid()
{
return $this->$user;
}
function get_firstname()
{
return $this->$first;
}
}
Here is call to the function that populates and than return the array of
objects.