Hey there.... ive got a problem or 2.. i think...
heres an example of what i want to do:
//ClassA.php
class A
{
var $Int;
function Print()
{
echo $int;
}
}
//ClassB.php
include("ClassA.php");
class B
{
var $AObj;
function B()
{
$AObj = new A;
}
}
Right now i want to be able to make use of the functions within class A within class B but in another file.... although when i try:
//Script.php
include("ClassB.php");
$BObj = new B();
$BObj->$AObj->Print();
that kicks up an error... SO!
this throws up the question, how can you use objects within objects to still keep the functionality needed... i hope this isnt too confusing...
the ACTUAL problem i have involves like 2 classes within 1 container class , but i cant make use of functions or variables in the other objects contained.. which is my problem..
Anyone have any info on why it wont work or if there is a different way to do it?