如何在Codeigniter中定义一些变量

时间:2017-01-16 07:47:22

标签: mysql codeigniter

如何转换此代码:

$_POST['search']['value']
if($_POST['length'] != -1)

($_POST['length'], $_POST['start'])

到Codeigniter 2.2

1 个答案:

答案 0 :(得分:1)

if($this->input->post("search"){    
   $this->input->post("search")['value']; //$_POST['search']['value']
}

if($this->input->post("length") && $this->input->post("start")){
    ($this->input->post("length"),$this->input->post("start")) //($_POST['length'], $_POST['start'])
}

<强> Check Reference