10-23-2009, 07:53 PM
|
#2 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Yes, use static functions in the class.
PHP Code:
class Myclass {
private static $classvariable;
public static function Myfunc($param) {
self::$classvariable = $param; return self::$classvariable;
}
}
$var = Myclass::Myfunc("This is actually working!");
echo $var; // echoes "This is actually working!"
__________________
|
|
|
|