When I view my list in my admin I would like to be able to make sure the controller name is sorted asc

Currently it does not sort alphabetically

 'name' => ucwords(str_replace('_', ' ', $controller)), 

Function

public function index() {
    $data['title'] = "User Group Permissions";

    $controller_files = $this->get_installed_permissions('name'); 

    $data['controller_files'] = array();

    $files = glob(FCPATH . 'application/modules/admin/controllers/*/*.php');

    if ($files) {

        foreach ($files as $file) {

            $controller =  basename(strtolower($file), '.php');

            $modules = $this->get_permissions_by_controller($controller);

            $module_data = array();

            foreach ($modules as $module) {
                $module_data[] = array(
                    'user_group_id' => $module['user_group_id'],
                    'name' => ucwords(str_replace('_', ' ', $controller) . ' > ' . $module['name']),
                    'edit' => site_url('admin/extension/permissions/update' .'/'. $controller .'/'. $module['user_group_id']),
                    'delete' => '' 
                );
            }

            $data['controller_files'][] = array(
                'name' => ucwords(str_replace('_', ' ', $controller)),
                'controller' => $controller,
                'module'    => $module_data,
                'install' => site_url('admin/extension/permissions/install') .'/'.$controller,
                'installed' => in_array($controller, $controller_files)
            );

        }
    }

    $this->load->view('template/extension/extension_permissions', $data);
}