1$colors = array("blue","green","red");
2
3//delete element in array by value "green"
4if (($key = array_search("green", $colors)) !== false) {
5 unset($colors[$key]);
6}
1$array = [0 => "a", 1 => "b", 2 => "c"];
2unset($array[1]); //Key which you want to delete
3/*
4$array:
5[
6 [0] => a
7 [2] => c
8]
9*/
10//OR
11$array = [0 => "a", 1 => "b", 2 => "c"];
12array_splice($array, 1, 1);//Offset which you want to delet
13/*
14$array:
15[
16 [0] => a
17 [1] => c
18]
19*/
1$result_Member = $this->Member->get_list_member_belong_to_company($id);
2
3/*
4$result_Member = array(
5 [10] => 10,
6 [20] => 11,
7 [30] => 12,
8)
9*/
10
11// remove key, get values only
12$member_ids = array_values($result_Member);
13
14/*
15$result_Member = array(
16 [0] => 10,
17 [1] => 11,
18 [2] => 12,
19)
20*/