public function remove($items)
    {
        if (!is_array($items)) {
            $items = array($items);
        }

        $allItems = $this->getAll();

        foreach ($items as $item) {
            $existingIndex = array_search($item, $allItems);
            if ($existingIndex === false) {
                return;
            }

            unset($allItems[$existingIndex]);
        }

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

        $allItems = $this->getAll();

        foreach ($items as $item) {
            $existingIndex = array_search($item, $allItems);
            if ($existingIndex === false) {
                return;
            }

            unset($allItems[$existingIndex]);
        }

        $this->setAll(array_values($allItems));
    }
public function remove ( $ items ) { if ( ! is_array ( $ items ) ) { $ items = array ( $ items ) ; } $ allItems = $ this -> getAll ( ) ; foreach ( $ items as $ item ) { $ existingIndex = array_search ( $ item , $ allItems ) ; if ( $ existingIndex === false ) { return ; } unset ( $ allItems [ $ existingIndex ] ) ; } $ this -> setAll ( array_values ( $ allItems ) ) ; }
Removes one or more items by value from the list in the option table.

Does not preserve array keys.

@param string|array $items
Removes one or more items by value from the list in the option table .