PHP Ds\Set remove() Function Last Updated : 16 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Ds\Set::remove() function of Ds\Set class in PHP is an inbuilt function which is used to remove specific values from a Set instance. This function can remove both single or multiple values from a Set. Syntax: void public Ds\Set::remove ([ mixed $...values ] ) Parameter: This function accepts the list of values separated by comma operator to be removed from the Set as a parameter. Return Value: This function does not returns any value. Below programs illustrate the Ds\Set::remove() function: Program 1: php <?php // Declare a set $set = new \Ds\Set([1, 2, 3, 4, 5]); // Corresponding array is echo "Actual Set is:\n"; print_r($set); // Removing values $set->remove(3, 4); echo "\nSet after removing values: \n"; print_r($set); ?> Output: Actual Set is: Ds\Set Object ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) Set after removing values: Ds\Set Object ( [0] => 1 [1] => 2 [2] => 5 ) Program 2: php <?php // Declare a set $set = new \Ds\Set(["Welcome", 2, "Geeks"]); // Corresponding array is echo "Actual Set is:\n"; print_r($set); // Removing values $set->remove(2); echo "\nSet after removing values: \n"; print_r($set); ?> Output: Actual Set is: Ds\Set Object ( [0] => Welcome [1] => 2 [2] => Geeks ) Set after removing values: Ds\Set Object ( [0] => Welcome [1] => Geeks ) Reference: http://php.net/manual/en/ds-set.remove.php Comment More infoAdvertise with us Next Article PHP | DsMap remove() Function G gopaldave Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-ds_set Similar Reads PHP DsSet remove() Function The Ds\Set::remove() function of Ds\Set class in PHP is an inbuilt function which is used to remove specific values from a Set instance. This function can remove both single or multiple values from a Set. Syntax: void public Ds\Set::remove ([ mixed $...values ] ) Parameter: This function accepts the 2 min read PHP | DsMap remove() Function The Ds\Map::remove() function is an inbuilt function in PHP which is used to remove and return a value by key. Syntax: mixed Ds\Map::remove( $key, $default ) Parameters: This function accepts two parameters as mentioned above and described below: $key: It holds the key value which need to remove. $d 2 min read PHP | DsDeque remove() Function The Ds\Deque::remove() function is an inbuilt function in PHP which is used to remove and return the index value. Syntax: public Ds\Deque::remove( $index ) : mixed Parameters: This function accepts single parameter $index which holds the index of Deque for which the element is to be returned and rem 2 min read PHP reset() Function The reset() function is an inbuilt function in PHP. This function is used to move any array's internal pointer to the first element of that array. While working with arrays, it may happen that we modify the internal pointer of an array using different functions like prev() function, current() functi 2 min read PHP | DsVector remove() Function The Ds\Vector::remove() function is an inbuilt function in PHP that is used to remove an element from the Vector at the specified ï¼index argument and returns the removed element. Syntax: mixed public Ds\Vector::remove( $index ) Â Parameters: This function does not accept any parameter. Â Return Value: 1 min read D3.js | d3.set.remove() function The set.remove() is a function in D3.js. If the given array contains the specified value then removes it and returns true. Otherwise, this function does nothing and returns false. Syntax: d3.set([Array]).remove(element); Parameters: This function accepts two parameters which are illustrated below: A 2 min read Like