php - Delete several row together-array -


i want delete several row foreach, have output bool(false) not array following code. how fix it?

<input type="checkbox" name="checked[]" value="1">  function delete_test() {     $delete = $this->input->post('checked');     if (is_array($delete) && count($delete) > 0) {         foreach ($delete $val) {             $this->db->query("delete hotel_units relation '$val'");         }         var_dump($delete);         echo "<br>is array";     } else {         var_dump($delete);         echo "<br>not array";     } // output is: bool(false) not array } 

i can guess $this->input->post means, if checkbox called 'checked[]' need $post:

$this->input->post('checked[]'); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -