i have function below
$arr_in=$this->getarrayid($id);
//$id print_r($arr_in)
function above when i return only one array
when i print_r($rs) array show all array
plz, how to fix to return multi array
$arr_in=$this->getarrayid($id);
//$id print_r($arr_in)
PHP Code:
Array
(
[0] => 11
[1] => 36
[2] => 41
)
PHP Code:
public function demo($id)
{
$arr_in=$this->getarr_questionid($id);
$countarr= count($arr_in);
$rs=array();
for($i=0;$i<$countarr;$i++){
$this->db->where('question_id',$arr_in[$i]);
$q=$this->db->get('answer_true');
$rs=$q->result();
}
return $rs;
}
when i print_r($rs) array show all array
plz, how to fix to return multi array