The End of an Array in PHP
To output the last element of an array, the
function array_pop is used.
See the example:
<?php
$arr = ['a', 'b', 'c'];
echo array_pop($arr);
?>
Code execution result:
'c'
To output the last element of an array, the
function array_pop is used.
See the example:
<?php
$arr = ['a', 'b', 'c'];
echo array_pop($arr);
?>
Code execution result:
'c'