Jump to content

davidannis

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by davidannis

  1. I have read on this site that directly accessing a variable in my class can cause problems. For example the oop tutorial says: or in this thread My question is, what problems am I avoiding by creating setter classes? I have a class I'm working on now that just seems bloated by all the getter and setter methods.
  2. I think that you need to put the values into an array and return them like this: function get_person() { $r[]=$this->get_firstname(); $r[]=$this->get_lastname(); $r[]=$this->get_age(); $r[]=$this->get_weight(); $r[]=$this->get_height(); return $r; }
×
×
  • Create New...