|
public function get_news($slug = FALSE)
{
if ($slug === FALSE)
{
$query = $this->db->get('news');
return $query->result_array();
}
$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}
[em]手册教程内容提要第二节新闻获取[/em]
那个判断就真的看不懂了
$slug作为参数赋值false?然后又判断它的值是不是false?
wtf什么意思啊求解释?
|
|