im returning data back from my db using codeigniter's database class , is there anyway I can put it into the same array without having to do additional array_merge logic after the loop completes?
foreach ($saved_forms[0] as $key => $value) {
$this->db->select('form_text');
$this->db->from('form_labels');
$this->db->where('form_label', $key );
$query = $this->db->get();
$form_names = $query->result_array();
$form_titles[] = $form_names;
}
result array
[4] => Array
(
[0] => Array
(
[form_text] => Participant Name
)
)
[5] => Array
(
[0] => Array
(
[form_text] => Date of Birth
)
)
What i want :
[0] => Array
(
[form_text] => Participant Name
[form_text] => Date of Birth
)