File Template Variable Problem
I cannot make this work:
private static function loadPropertiesFromGlobalVariables($aVariableNames){
foreach($aVariableNames as $sVariableName){
if(array_key_exists($sVariableName, $GLOBALS))
self::$$sVariableName = $GLOBALS[$sVariableName];
unset($sVariableName);
}
}
This is how I have it in the template:
private static function loadPropertiesFromGlobalVariables(\$aVariableNames){
foreach(\$aVariableNames as \$sVariableName){
if(array_key_exists(\$sVariableName, \$GLOBALS))
self::\$\$sVariableName = \$GLOBALS[\$sVariableName];
unset(\$sVariableName);
}
}
And this what I get:
private static function loadPropertiesFromGlobalVariables($aVariableNames){
foreach($aVariableNames as $sVariableName){
if(array_key_exists($sVariableName, $GLOBALS))
self::$sVariableName = \$GLOBALS[$sVariableName];
unset($sVariableName);
}
}
Please sign in to leave a comment.
wow, nothing??