current

It returns the current element in an array

Example

<?php
$web = array(‘PHP’, ‘JSP’, ‘ASP’, ‘JS’);
echo  current($web);
?>

Output

PHP

Share