View Single Post
Old 06-24-2008, 06:38 AM   #1 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 255
Thanks: 39
sarmenhb is on a distinguished road
Default trying to figure out how classes work - need help

here is my sample class

Code:
<?php

class human {

var $race;
var $ethnicity;
var $height;
var $weight;
var $haircolor;
var $age;

function mood($mood) {

echo "Today i feel like i am $mood"; 
}
}

class male extends human {  


}

class female extends female {


}


$sarmen = new male();
$natalie = new female();
$sarmen->mood("excited");
$natalie->mood("disturbed");

?>
when i run it i get this error

Fatal error: Class 'female' not found in C:\wamp\www\class\mytest.php on line 23

but the class female does exist, what am i doing wrong?
__________________
http://www.sarmenhb.com
Send a message via AIM to sarmenhb Send a message via MSN to sarmenhb Send a message via Yahoo to sarmenhb Send a message via Skype™ to sarmenhb
sarmenhb is offline  
Reply With Quote