Hi folks,
Let's say I have 2 php files which are a_class.php and b_class.php. These 2 files contain class A and class B respectively. Would anybody tell me how I can construct the class B object in class A?
Thanks in advance!
Billy
do something like this.. declare an object of class1 in the class1.php file... <?php class test {
function bla1 {}
}
$object = new test; ?>
then class2: <?php include ("class1"); class test2 { function bla2() { global $object $object->bla1; } ?>
Thanks! Can I do something like this instead?
<?php class test {
} ?>
then class2: <?php include ("class1"); class test2 {
function bla2() { $object = new test; $object->bla1; }
?>