Public Method

 
    <?php   class Staff
   {
      private $name;      public function setName($name) {
         $this->name = $name;
     }
   }   $staff = new Staff;
   $staff->setName("Mary");?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.