The Ds\Deque::remove() function is an inbuilt function in PHP which is used to remove and return the index value.
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 removed.
Return Value: This function returns and remove the element at given index in the Deque.
Below programs illustrate the Ds\Deque::remove() function in PHP:
Elements of Deque Ds\Deque Object (  => 10  => 20  => 30  => 40  => 50  => 60 ) Element at index 2: 30
Elements of Deque Ds\Deque Object (  => geeks  => for  => geeks ) Element at index 1: for
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.