Home » Php » php mysql how to get the value inside an array

php mysql how to get the value inside an array

Posted by: admin June 30, 2018 Leave a comment

Questions:
array(1) {
  [0] => array(2) {
    ["list_length"] => string(2) "10" 
    ["id"] => array(4) {
      [0] => string(1) "1"
      [1]=> string(2) "10" 
      [2]=> string(1) "3"
      [3]=> string(2) "13"
    }
  }
}

codeigniter

How can I get the values 1,10,3,13 inside

["id"]=> array(4) {
  [0]=> string(1) "1"
  [1]=> string(2) "10"
  [2]=> string(1) "3"
  [3]=> string(2) "13"
}

I tried :

public function recieve($data){
    //var_dump($data);
    $ids = $data;
    var_dump($ids);
    $this->db->set('recieve', '1');
    $this->db->where('no', $ids);
    $this->db->update('trainee')`
 }
Answers: