Hi Reader's,
Welcome to FindNerd, today we are going to discuss the use of reset() function in php ?
So, basically The reset() function moves the internal pointer to the first element of the array.
syntax of reset() function
reset(array);
array parameter is required.
you can take reference of below example:
<?php
//here define a variable of array
$Emp_name = array("Joe", "Roy", "Jorden", "Scott");
//here call reset() function and print
echo reset($Emp_name);
?>
The above example output will be:
Joe
0 Comment(s)