PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
class A{
function hello(){
prints(self::$value);
}
}
class B extends A{
static $value = "something";
}
class C extends A{
static $value = "something else";
}
B::hello(); //want this to print "something";
C::hello(); //want this to print "something else";
I am a complete php newb and would greatly appreciate any help. For the purposes of the program I am writing I can also make $value a constant as long as they are class values and not instance values.