Blogger Information
Blog 15
fans 0
comment 0
visits 8403
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数组下标重新归序
我们的关系如此狭窄
Original
532 people have browsed it
<?php
/*
 * 返回数组中所有的值并给其建立从0开始递增的数字索引 $arr = [4=>10,1=>22,9=>55,0=>255];
 * tips: 使用函数array_values()
 */
$arr = [4=>10,1=>22,9=>55,0=>255];
$arr_ = array_values($arr);
print_r($arr_); // Array ( [0] => 10 [1] => 22 [2] => 55 [3] => 255 )


Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post