iPixel Posted January 4, 2010 Share Posted January 4, 2010 So i have this array that simply contains #'s 123456, 234567, 345678 etc... <?php $FileNum = array(); array_push($FileNum,$result_1['FILENUMBER']); ?> my issue is that these #'s repeat, how can i flush out the duplicates so that i'm left with only unique #'s? Thanks! Link to comment https://forums.phpfreaks.com/topic/187132-removing-duplicated-from-array/ Share on other sites More sharing options...
monkeypaw201 Posted January 4, 2010 Share Posted January 4, 2010 You can search the array with array_search(), and if its not in there, add it. PHP page: http://php.net/manual/en/function.array-search.php Link to comment https://forums.phpfreaks.com/topic/187132-removing-duplicated-from-array/#findComment-988432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.