?? [ju?ni:k] US [ju?nik]
adj. ???, ???, ???;
PHP array_unique() ?? ???
??: ???? ?? ? ??
??: ??array_unique(array)
????:
???? | ?? |
?? | ?????. ??? ?????. |
?? ?? | ?? ??. ?? ??/??? ???? ??? ?????. ??? ?: SORT_STRING - ???. ??? ???? ?????. SORT_REGULAR - ? ??? ?? ??? ?????(?? ASCII, ??? ???? ??) SORT_NUMERIC - ? ??? ??? ?????. SORT_LOCALE_STRING - ?? ???? ???? ? ??? ???? ?????(setlocale()? ?? ?? ??). |
??: ?? ?? ???? ??? ?? ? ?? ?? ?? ??? ? ??? ???? ??? ?? ? ??? ?????. ?? ???? ?? ???? ???? ???? ??? ?? ????? ??? ????.
PHP array_unique() ?? ?
<?php $a=array("a"=>"php中文網(wǎng)","b"=>"西門(mén)","c"=>"php中文網(wǎng)"); print_r(array_unique($a)); ?>
???? ???
??? ????? ??? "???? ??" ??? ?????
??:
Array ( [a] => php中文網(wǎng) [b] => 西門(mén) )
<?php $b=array("1"=>"php中文網(wǎng)","2"=>"滅絕師太","c"=>"php中文網(wǎng)",'4' => "歐陽(yáng)克"); print_r(array_unique($b)); ?>
???? ???
??' ??? ??? ? ??
??:
Array ( [1] => php中文網(wǎng) [2] => 滅絕師太 [4] => 歐陽(yáng)克 )