Basically End function sets the pointer of an array to the last element of array.
Syntax-end(array)
For Example-
<?php
$arr = array('name'=>'amit','age'=>'22','city'=>'bhopal','profession'=>'php developer');
$lastValue = end($arr);
?>
OUTPUT : php developer
Posted Amit Tiwari
Syntax-end(array)
For Example-
<?php
$arr = array('name'=>'amit','age'=>'22','city'=>'bhopal','profession'=>'php developer');
$lastValue = end($arr);
?>
OUTPUT : php developer
Posted Amit Tiwari
No comments:
Post a Comment