messer Posted April 30, 2009 Share Posted April 30, 2009 I have an array that contains different and identical values ex:array(1,2,2,3,4,4) but i want to arrange just distinct values (1,2,3,4). How should i do it? Help someone pls,give some ideas, I've never worked before with arrays. Link to comment https://forums.phpfreaks.com/topic/156289-array-problems/ Share on other sites More sharing options...
mrMarcus Posted April 30, 2009 Share Posted April 30, 2009 array_unique() $arr = array(1,2,2,3,4,4); //your array; $res = array_unique($arr); //your array .. with unique values only; Link to comment https://forums.phpfreaks.com/topic/156289-array-problems/#findComment-822809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.