PHP pos() function is used to return the current item in a PHP array. It is an inbuilt function of PHP. The working of this function is the same as the working of the current() function.
$array is a PHP array.
<?php $arr1 = array("apple","orange","banana","fig",); $c_value=pos($arr1); // it will return the first item of array i.e. apple echo "Current item of array is $c_value"; ?>