当前位置: 首页 > 网络学院 > 服务端脚本教程 > PHP > array_pop() 函数
The array_pop() function deletes the last element of an array.
array_pop()函数删除了一个数组中的最后一个元素。
array_pop(array) |
| Parameter参数 | Description描述 |
|---|---|
| array | Required. Specifies an array 必要函数。指定一个数组 |
<?php
$a=array("Dog","Cat","Horse");
array_pop($a);
print_r($a);
?> |
The output of the code above will be:
上述代码将输出下面的结果:
Array ( [0] => Dog [1] => Cat ) |
评论 (0) All