新しいデータを既存の配列にプッシュしようとしています$query
:
$query = $this->db->get('questions');
foreach ($query->result_array() as $row) {
$get_answers = $this->db->get_where('answers', array('question_id' => $row['question_id']), 4);
}
//push all the get_answers data into $query array as a subarray
return $query;