PHP array_unique( ) functionThe array_unique( ) function is an inbuilt function of PHP and it is used to remove duplicate values from an array. This function was introduced in 4.0.1 SyntaxParameters
ReturnThe array_unique( ) function returns the filtered array. Example 1Output: Array ( [a] => zee [c] =>aajtak [d] =>ndtv ) Example 2Output: Array ( [0] => java [1] =>php [3] => python [4] => html ) Example 3Output: Array ( [a] =>abhijeet [b] =>arijit ) Example 4Output: Array ( [a] => dell [0] =>hp [1] =>leneovo )
Next TopicPHP Array Functions
|