protected static function paginateSimpleChoices(array $choices, $startTo, $endTo)
    {
        $paginatedChoices = [];
        $index = 0;

        foreach ($choices as $key => $choice) {
            if ($index >= $startTo && $index < $endTo) {
                $paginatedChoices[$key] = $choice;
            }

            ++$index;
        }

        return $paginatedChoices;
    }
protected static function paginateSimpleChoices(array $choices, $startTo, $endTo)
    {
        $paginatedChoices = [];
        $index = 0;

        foreach ($choices as $key => $choice) {
            if ($index >= $startTo && $index < $endTo) {
                $paginatedChoices[$key] = $choice;
            }

            ++$index;
        }

        return $paginatedChoices;
    }
protected static function paginateSimpleChoices ( array $ choices , $ startTo , $ endTo ) { $ paginatedChoices = [ ] ; $ index = 0 ; foreach ( $ choices as $ key => $ choice ) { if ( $ index >= $ startTo && $ index < $ endTo ) { $ paginatedChoices [ $ key ] = $ choice ; } ++ $ index ; } return $ paginatedChoices ; }
Paginate the flatten simple choices.

@param array $choices The choices
@param int   $startTo The start index of pagination
@param int   $endTo   The end index of pagination

@return array The paginated choices
Paginate the flatten simple choices .