$skillsarray = ["php","java","ios","php","php","php","php","java","java","ios"];
$cityarray = ["Chennai","Theni","Theni","Mumbai","Chennai","Theni","Chennai","Hyderabad","Theni","Madurai"];
如果我将array_unique
用于$skillsarray
,请将结果设为
[ “PHP”, “Java” 的, “IOS”]
如果我将array_unique
用于$cityarray
,请将结果设为
{ “0”: “奈”, “1”: “与Theni”, “3”: “孟买”, “7”: “海得拉巴”, “9”: “马杜赖”}
有人能解释为什么array_unique($cityarray)
正在产生字典结果吗?