您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

逆序二维数组插入一元素的php代码

2024/3/22 7:20:54发布29次查看
逆序二维数组插入一元素的php代码,需要的朋友可以参考下
代码如下:
$arr){
if ($arr[0] == $ainsert[0]){
$maxcmpidx = $idx;
}
$cnt++;
}
if ( !$maxcmpidx){
$maxcmpidx = $cnt++;
}
$asorted[$maxcmpidx] = $ainsert;
for ($i = $maxcmpidx; $i > 0; $i--){
if ($asorted[$i][1] > $asorted[$i-1][1]){
$atmp = $asorted[$i-1];
$asorted[$i-1] = $asorted[$i];
$asorted[$i] = $atmp;
continue ;
}
break;
}
for ($i = $cnt; $i > $maxcnt; $i--){
unset($asorted[$i-1]);
}
print_r($asorted);
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product