Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to use next() Function in php ?
This function returns the array value in the next place and outputs the next element in the array.
means we can say that it always returns the next element in an array.
syntax of next() function
next(array);
array parameter is required.
you can take reference of bellow example:
<?php
//here define a variable of array
$Emp_name = array("Joe", "Roy", "Mac", "Brandan");
//here call next() function and print
echo next($Emp_name);
?>
The above example will output something:
Roy
0 Comment(s)