here i have an array that i want to convert the output of.
here is the function:
public function access($key)
{
    $query = $this->db->query("SELECT box_role.group_id FROM box_role INNER JOIN box_menu ON box_role.menu_id=box_menu.id WHERE box_menu.key='$key'")->result_array();
    return $query;
}
and these are the results:
Array (
    [0] => Array (
        [group_id] => 1
    ) 
    [1] => Array ( 
        [group_id] => 2 
    ) 
    [2] => Array ( 
        [group_id] => 4 
    ) 
);
but I would like the output to be like this:
$new_array = array(1, 2, 4);