Here\'s my question for today. I\'m building (for fun) a simple templating engine. The basic idea is that I have a tag like this {blog:content} and I break it in a method an
You may want to save a reference to the static array first.
class Test
{
public static $foo = array('x' => 'y');
}
$class = 'Test';
$action = 'x';
$arr = &$class::$foo;
echo $arr[$action];
Sorry for all the editing ...
EDIT
echo $class::$foo[$action];
Seems to work just fine in PHP 5.3. Ahh, "Dynamic access to static methods is now possible" was added in PHP 5.3