How do we sort an array of names taken from a text file, displaying only unique names?
Use the function array_unique(). This will sort and remove the duplicates.
Answered by: Jayesh Wadhwani
Comments on this Question/AnswerHow do we sort an array of names taken from a text file, displaying only unique names?
By: gopi, 30 Dec 2008 10:58:16
Reply to comments / post your own comment >>>
ASK A QUESTION
More arrays PHP Questionshi, i am querying the DB as follows: $result=mysql_query("SELECT name,items FROM mytable WHERE user_id='$id'"); now,i want to create an array to insert the values that are as a result of this query e'g let's say this is the resultant data: n
what is a array?
How do I remove the first element from an array?
How do I add to the beginning of an array and find the number of elements in it?
How do I find if a value is already in an array or not?