<?php $array=array("first","sencond","third"); #1.echo end($array); #2.echo $array[count($array)-1]; #3.echo array_pop($array); #4.echo array_pop(array_slice($array,-1,1)); ?>
时间: 2024-10-05 01:54:59
<?php $array=array("first","sencond","third"); #1.echo end($array); #2.echo $array[count($array)-1]; #3.echo array_pop($array); #4.echo array_pop(array_slice($array,-1,1)); ?>