Hello
<?php
class Templater
{
var $params = array();
public static function assign($name, $value)
{
$this->params[] = array($name => $value);
}
public static dunction draw()
{
return $this->params;
}
}
<?php
$test = Templater::assign('key', 'value')->draw();
print_r($test);
I need to function "assign" was static, but $params was common for the whole class.. BUt this code is not working((
Fatal error: Using $this when not in object context
Any ideas?