Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

how to return multi array in select array codeigniter 3.2

$
0
0
i have function below


$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);
            
$countarrcount($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;
    } 
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

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>