Q:

Passing multi-Array from Model to a Controller

I have a controller with an array $added_tabs.  I pass this array to a function model. 
In my model if i print the results everything works fine, but if i return $row to my controller again, only show 1 record. 
Any ideas? 
In my controller i have this:
$this->load->model('check_info/check_post_day');
$admin_post_day = $this->check_post_day->check_post($added_tabs);
echo "<pre>"; print_r($admin_post_day); echo "</pre>";

In my model i have this:
class Check_post_day extends CI_Model {

function check_post($data) { 
    foreach ($data as $info) {
        $row = array(); 
            $query = $this->db->query("
            SELECT

            admin_post_day.page_id,
            admin_post_day.admin_id,
            admin_post_day.hour_post,
            admin_post_day.discount,
            admin_post_day.url,
            admin_post_day.message_post,
            admin_post_day.voucher,
            admin_post_day.date_saved,

            fb_pages.page_id,
            fb_pages.id_fb_pages,

            fb_pages_admin.access_token

            FROM admin_post_day

            inner join fb_pages
            on admin_post_day.page_id=fb_pages.page_id

            inner join fb_pages_admin
            on fb_pages.id_fb_pages=fb_pages_admin.id_fb_pages

            where admin_post_day.page_id LIKE " .  $info['page_id'] . " 
            ORDER BY admin_post_day.date_saved DESC LIMIT 1
            ");
    foreach ($query->result_array() as $row) {
    $info = $row;
    }
        if ( ! empty( $query ) ) {
            return $row;
        } else {
            return false;
        }
    }
}
}

//upate
class Check_post_day extends CI_Model {

function check_post($data) { 
    foreach ($data as $info) {
        $row = array(); 
            $query = $this->db->query("
            SELECT

            admin_post_day.page_id,
            admin_post_day.admin_id,
            admin_post_day.hour_post,
            admin_post_day.discount,
            admin_post_day.url,
            admin_post_day.message_post,
            admin_post_day.voucher,
            admin_post_day.date_saved,

            fb_pages.page_id,
            fb_pages.id_fb_pages,

            fb_pages_admin.access_token

            FROM admin_post_day

            inner join fb_pages
            on admin_post_day.page_id=fb_pages.page_id

            inner join fb_pages_admin
            on fb_pages.id_fb_pages=fb_pages_admin.id_fb_pages

            where admin_post_day.page_id LIKE " .  $info['page_id'] . " 
            ORDER BY admin_post_day.date_saved DESC LIMIT 1
            ");

    if($query->num_rows() > 0){
        $rows[] = $query->result_array();
    }
}
return $rows;
}
 }

A:

Of course , you use return in the loop , so right after the first run - it returns the output. 
Change:
if ( ! empty( $query ) ) {
    return $row;
} else {
    return false;
}

To:
if ( ! empty( $query ) ) {
    $rows[] = $row;
}

And after the loop ends:
if ( count($rows) > 0 ) {
    return $rows;
} else {
    return false;
}

UPDATE
Please notice that you're wasting resources by using that second loop. 
It's a bad practice in my opinion. 
   foreach ($query->result_array() as $row) {
    $info = $row;
    }

Consider adding the output of the result_array function and handle it instead. 
And according to @RocketHazmat 's comment,

empty($query) doesn't do what you think it does. 

You should change the condition to:
if( count($row) > 0)

UPDATE 2
Instead of the second loop and condition:
if($query->num_rows() > 0){
    $rows[] = $query->result_array();
}

please notice that if result_array returns an array $rows would be a multi-dimensional array.