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
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