I don't know very good how to describe my problem, but here's what I want to do: I want to escape the language variables and convert them to static variables. Something like this
public static $languages = array('nl', 'en');
public static $nl;
public static $en;
public function __construct(){
foreach(self::$languages as $lang){
self::{$lang} = $content[$lang];
}
}
I know this is possible with a non static variable like this:
$this->{$lang} = $content[$lang];
but I constantly get errors when trying to convert it to a static variable. Is there a way to do this? or is it impossible in php?