public function removeByIndex($indices)
    {
        if (!is_array($indices)) {
            $indices = array($indices);
        }

        $indices = array_unique($indices);

        $allItems = $this->getAll();
        foreach ($indices as $index) {
            unset($allItems[$index]);
        }

        $this->setAll(array_values($allItems));
    }
public function removeByIndex($indices)
    {
        if (!is_array($indices)) {
            $indices = array($indices);
        }

        $indices = array_unique($indices);

        $allItems = $this->getAll();
        foreach ($indices as $index) {
            unset($allItems[$index]);
        }

        $this->setAll(array_values($allItems));
    }
public function removeByIndex ( $ indices ) { if ( ! is_array ( $ indices ) ) { $ indices = array ( $ indices ) ; } $ indices = array_unique ( $ indices ) ; $ allItems = $ this -> getAll ( ) ; foreach ( $ indices as $ index ) { unset ( $ allItems [ $ index ] ) ; } $ this -> setAll ( array_values ( $ allItems ) ) ; }
Removes one or more items by index from the list in the option table.

Does not preserve array keys.

@param int[]|int $indices
Removes one or more items by index from the list in the option table .