jjzjj

almostallTech

全部标签

php - 调用 array_unique 后删除未定义的数组索引

$almostallTech=array();$almostallTech[]="no";$almostallTech[]="no";$almostallTech[]="yes";$almostallTech[]="yes";$almostallTech[]="no";$almostallTech[]="yes";$almostallTech=array_unique($almostallTech);printf("sizeofarray:%d",sizeof($almostallTech));for($x=0;$x调用unique方法后,它返回大小为2-这是正确的。然而,for循环给