I have little knowledge of OOP of PHP!...
but CI is a good framework even though I’m not good at the OOP..
I’d like to use some variable globbally in the method of a class..
class Board extends Controller{
function Board(){
parent::Controller();
$this->load->model('board/board_admin_model', 'board_admin', TRUE);
....
if(!$code) $code="forum"; //--> error this line..
$query = $this->board_admin->getBoardConfig($code);
$BoardConfig = $query->row();
}
function bRead($code,$no){
if($BoardConfig->name){ //--> error this line
....
}
}
}
even if I defined the $code, $BoardConfig in the consturctor,
I can’t use those within the bRead( , ) method
how do i do if I’d like to use global variable within other method in the same class??
