View Single Post
  #6 (permalink)  
Old 04-18-2008, 07:35 AM
jegan jegan is offline
D-Web Sr.Programmer
 
Join Date: Jul 2007
Posts: 161
jegan is on a distinguished road
Default Re: PHP Classes For Beginners

An example

Objects have been created to compare with real time objects like anything u are seeing. Now I have explained the oops concept using the object BOX. I am going to create a class to create objects like BOX.

Member Variable in Box Object
An object state is defined by the member variable. In BOX object the states are width and the height.

var width;
var height;

class
PHP Code:
class Box
{
    var  
width;
    var 
height;

__________________
Thanks & Regards,
Jegan CBK
"We will either find a way, or make one!”

Last edited by jegan : 04-21-2008 at 06:40 AM.
Reply With Quote