0
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’s out of function $_this and use it within the function Configurationsystem(). The problem is that she is not accessing, even using the word global. In case I put $_this =& get_instance(); within the function, it works. My PHP is version 5.6.