Open In App

PHP SplDoublyLinkedList offsetGet() Function

Last Updated : 23 Jun, 2023
Comments
Improve
Suggest changes
1 Like
Like
Report
The SplDoublyLinkedList::offsetGet() function is an inbuilt function in PHP which returns the value at given index. Syntax:
mixed SplDoublyLinkedList::offsetGet( $index )
Parameters: This function accepts a single parameter $index which holds the index value. Return Value: It returns the value at given index. Below programs illustrate the SplDoublyLinkedList::offsetGet() function in PHP: Program 1:
Output:
int(30)
string(5) "Geeks"
Program 2:
Output:
int(2)
int(3)
int(8)
Reference: https://www.php.net/manual/en/spldoublylinkedlist.offsetget.php

Next Article

Similar Reads