array_values() 函数用于返回数组中所有的值,并返回一个包含数组中所有值的新数组。
语法:
array_values(array)
参数:
示例:
<?php
$colors = array("red", "green", "blue");
print_r(array_values($colors));
?>
输出:
Array
(
[0] => red
[1] => green
[2] => blue
)
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>