array_values 返回数组中所有的值基本语法:
array array_values ( array $input )array_values() 返回 input 数组中所有的值并给其建立数字索引。
参数介绍:
返回值: 返回含所有值的索引数组。
注意:返回的新数组的所有将使用数字索引,从0开始。
实例:
<?php$array = array( "php" => "php code", "html" => "html code", "css" => "css code", "js" => "js code",);print_r(array_values($array));?>
运行结果:
Array ( [0] => php code [1] => html code [2] => css code [3] => js code )
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!