yii\helpers\BaseHtml::ol PHP Method

ol() public static method

Generates an ordered list.
public static ol ( array | Traversable $items, array $options = [] ) : string
$items array | Traversable the items for generating the list. Each item generates a single list item. Note that items will be automatically HTML encoded if `$options['encode']` is not set or true.
$options array options (name => config) for the radio button list. The following options are supported: - encode: boolean, whether to HTML-encode the items. Defaults to true. This option is ignored if the `item` option is specified. - itemOptions: array, the HTML attributes for the `li` tags. This option is ignored if the `item` option is specified. - item: callable, a callback that is used to generate each individual list item. The signature of this callback must be: ```php function ($item, $index) ``` where $index is the array key corresponding to `$item` in `$items`. The callback should return the whole list item tag. See [[renderTagAttributes()]] for details on how attributes are being rendered.
return string the generated ordered list. An empty string is returned if `$items` is empty.
    public static function ol($items, $options = [])
    {
        $options['tag'] = 'ol';
        return static::ul($items, $options);
    }