How can we get the first element of an array in php ?

We can get the first element of an array by the function current();

$arr = array(‘name’=>’Kiran’,’age’=>’24’,’profession’=>’PHP Developer’);
echo $firstvalue = current($arr);

OUTPUT: Kiran