批改状态:合格
老师批语:
array_values() 返回数组中所有的值并给其建立数字索引。
<?php $arr = [4 => 10, 1 => 22, 9 => 55, 0 => 255]; echo '<pre>索引处理前<br>'; print_r( $arr ); echo '<hr>索引处理后<br>'; print_r( array_values( $arr ) ); ?>
点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号