I have the following code:
<?php
$_this =& get_instance();
function ConfiguracoesSistema($coluna){
global $_this;
$configuracoes = $_this->db->get('configuracao');
if($configuracoes->num_rows() > 0){
return $configuracoes->row()->$coluna;
}
return false;
}
?>
I need to get the variable that is outside the $ _ this function and use it inside the System Settings () function. The problem is that it is not accessing, even using the word global . If I put $ _ this = & get_instance (); inside the function, it works. My PHP is version 5.6.