$uniquearr = array_unique($myarr);
var_dump($uniquearr);
Always read docs first
array_unique
Return Values
Returns the filtered array.
More Related Contents:
- Remove duplicate items from an array [duplicate]
- How do I use array_unique on an array of arrays?
- How to make array inside in foreach loop – php? [closed]
- Sum up array values [closed]
- Is there any array function by which I can get the expected result? [duplicate]
- How can I sort arrays and data in PHP?
- Convert a PHP object to an associative array
- PHP in_array() / array_search() odd behaviour
- Get the first element of an array
- PHP Array to JSON Array using json_encode(); [duplicate]
- How can I check if an array contains a specific value in php?
- How to reindex an array?
- PHP list all files in directory [duplicate]
- How to sort a multidimensional array by a certain key?
- How to sort an array of UTF-8 strings?
- Casting an Array with Numeric Keys as an Object
- How to split a long string without breaking words?
- How to trim white spaces of array values in php
- What’s the difference between array_merge and array + array? [duplicate]
- PHP: do arrays have a maximum size?
- PHP – Merge two arrays (same-length) into one associative?
- PHP – Convert multidimensional array to 2D array with dot notation keys
- Is there a way to loop through a multidimensional array without knowing it’s depth?
- Loop a multidimensional array and only print two specific column values per row
- Group rows in an associative array of associative arrays by column value and preserve the original first level keys
- PHP get values from SimpleXMLElement array
- How to implode array with key and value without foreach in PHP
- Access first level keys with array_map() without calling `array_keys()`
- Save array in mysql database
- How to count the consecutive duplicate values in an array?