4
I need to remove duplicate values from a PHP array, for example:
$array = ('2015', '2015', '2012', '2013', '2014', '2014', '2016')
I wish I had the output:
Array ( [0] => 2012 [1] => 2013 [2] => 2016 )
that all that is duplicated be removed.
I tried with array_unique
, but it eliminates the duplicate and shows as unique, being that I need to eliminate the two.
Would have a way?
wow, perfect!! thank you @rray
– Denis L. Murara