PHP current() function is used to return the value corresponding to the current pointer of a PHP array. It is an inbuilt function of PHP.
$array is a PHP array.
<?php $arr1 = array("apple","orange","banana","fig",); $current_value=current($arr1); // it will return value corresponding to the current pointer i.e. apple echo "Current value is $current_value <br>"; ?>
You May Also Like
Subscribe To Never Miss an Article From