how to delete double values in array?
I've got an array like this one:
arrayname[1] = "jacob";
arrayname[2] = "peter";
arrayname[3] = "jacob";
arrayname[4] = "nicholas";
I want to remove the double jacob 开发者_Python百科so it will be like
arrayname[1] = "jacob";
arrayname[2] = "peter";
arrayname[3] = "nicholas";
How do I do that?
array_unique()
$array = array_unique($array);
精彩评论