I am getting result set rows from the database in the following way.
N/w_id N/W_name N/W_contact C_id C_name Seconds
1 x e1 1 abc 2000
1 x e1 1 abc 3450
1 x e1 2 def 2300
1 x e1 3 ghi 800
1 x e1 3 ghi 5678
2 y e2 12 abcd 2000
2 y e2 12 abcd 3450
2 y e2 21 defg 2300
2 y e2 32 ghij 800
2 y e2 32 ghij 5678
When i extracted all these rows in an array using $this->model->function_name() into an array called $result. All these rows are come as different arrays in one array but i want a single array from the $result in the below format.
array => [0] => [N/W_id] => 1
[N/W_name] => x
[N/W_contact] => e1
[cha] => [0] => [C_id] => 1
[C_name] => abc
[Seconds] => 5450
[1] => [C_id] => 2
[C_name] => def
[Seconds] => 2300
[2] => [C_id] => 3
[C_name] => ghi
[Seconds] => 6478
[1] => [N/W_id] => 2
[N/W_name] => y
[N/W_contact] => e2
[cha] => [0] => [C_id] => 12
[C_name] => abcd
[Seconds] => 5450
[1] => [C_id] => 21
[C_name] => defg
[Seconds] => 2300
[2] => [C_id] => 32
[C_name] => ghij
[Seconds] => 6478