a class inside a class
Posted: Sun Jun 06, 2004 6:21 pm
hi, i've been trying to use the functionality of one class inside another:
should the following code work in theory?
the above should output yay, right?
thanks
j
should the following code work in theory?
Code: Select all
class out {
var $output = "yay";
function put() {
echo $this->$output;
}
}
class test {
function testme() {
global $out;
$out->put();
}
}
$out = new out;
$test = new test;
$test->testme();thanks
j