The Ds\Vector::remove() function is an inbuilt function in PHP which is used to remove the value from index and return it.
public Ds\Vector::remove( $index ) : mixed
Parameters: This function accepts single parameter $index which holds the index at which the element is to be removed.
Return Value: This function returns the value that was removed.
Exception: This function throws OutOfRangeException if the given index is out of range or not valid.
Below programs illustrate the Ds\Vector::remove() function in PHP:
Vector Elements Ds\Vector Object (  => geeks  => for  => geeks  => DataStructures ) Last element of the vector: string(14) "DataStructures"
Vector Elements Ds\Vector Object (  => 1  => 2  => 3  => 4  => 5  => 6 ) Last element of the vector: int(4)
- PHP Ds\Set remove() Function
- D3.js | d3.map.remove() Function
- D3.js | d3.set.remove() function
- PHP | Ds\Sequence remove() Function
- PHP | Ds\Deque remove() Function
- PHP | Ds\Vector remove() Function
- How to remove error Call to undefined function curl_init()?
- Remove a cookie using PHP
- Remove border from IFrame using CSS
- How to remove items from a select box ?
- jQuery | Remove Elements
- Remove new lines from string in PHP
- How to remove the first character of string in PHP?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.