Define boolean Class properties : Class Property « Class « PHP






Define boolean Class properties


<?php
     class WebClient
     {
          var $frames;
          var $tables;
          var $layers;
     }
     
     
     $my_browser = new WebClient;     
     
     $my_browser->frames = true;
     $my_browser->tables = true;
     $my_browser->layers = true;

print("Browser Has Frames: " . $my_browser->frames);     
?>
           
       








Related examples in the same category

1.Assign default property value
2.Changing the Value of a Property from Within a Method
3.Accessing a Property from Within a Method
4.Adding Properties
5.Adding the $age variable to Cat
6.Changing the Value of a Property from Within a Method
7.Class including a complete collection of get and set methods.
8.Controlling Access to Class Members
9.Define a setter and getter