php-windows | 2003112
Date: 11/29/03
- Next message: Jan Hrebenar: "[PHP-WIN] How to find out if PC is online"
- Previous message: Jeff Anderson: "[PHP-WIN] Newbie Error Logging Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello ALL!
I tried to make a class in another class something like:
<?php
class A{
function a(){
echo "Hello from class A a subclass of ".$this->parent->var1;
}
}
class B{
function b(){
$this->var1="Class B";
$this->var2=new A();
}
}
$c=new b();
?>
In this script I use class A inside class B and I want to use
variable from B inside A.
I wanted: Hello from class A a subclass of Class B
But the result is: Hello from class A a subclass of
Is it possible something like: $this->parent->var1 or similar?
-- Best regards, Alex-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Jan Hrebenar: "[PHP-WIN] How to find out if PC is online"
- Previous message: Jeff Anderson: "[PHP-WIN] Newbie Error Logging Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

