hey you mite wanna read this: http://www.php.net/oop
Der r a couple of ways to do wat u want
<?php
class first_class {
var $var1;
var $var2
function my_method() {
//code including $this->var1 and $this->var2
}
}
class second_class {
var $var2;
function super_method() {
//First method is to create an object of the first class
$obj = new first_class;
//Call the method
$obj->my_method();
//Second method, call the method, without intiating a new object
first_class::my_method();
}
}
Third way would b extending the second_class
<?php
class second_class extends first_class{
var $var2;
function super_method() {
// Now you can calll the my_method as if it were defined in this class
$this->my_method();
}
}
?>
I strongly suggest you read the PHP manual on Object Oriented Programming, since there r sum very good improvements on the way, (in PHP 5)