[eluser]fajarsulaksono[/eluser]
hi guys i have a question about fetching calendar event data from database to controller
here is the controller function :
Code:
function index()
{
$query_kalender = $this->mhome->getCalenderEvent();
$this->db->orderby('id', 'desc');
$this->db->limit(10);
$news = $this->db->get('event');
$events = array();
foreach($news->result_array() as $row)
{
$events[("j",$row['tgl'])] = ''.base_url().'index.php/news/'.$row['id'].'';
}
var_dump($events);
$data = array(
'kalender' => $this->calendar->generate('','',$data_kalender),
);
$this->parser->parse('home', $data);
}
the problem is
always shows the 31 date (variable $events actually contain todays date) and $row[tgl_1] is date formatted mysql column.
anyone can help me ?
thx