O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

array_unique

Synopsis

array array_unique(array array[, int sort_flags])

Creates and returns an array containing each element in the given array. If any values are duplicated, the later values are ignored. The sort_flags optional argument can be used to alter the sorting methods with constants: SORT_REGULAR, SORT_NUMERIC, SORT_STRING (default), and SORT_LOCALE_STRING. Keys from the original array are preserved.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required