How do you remove duplicate values from an array?
$values = array("banana","apple","pear","banana");
$values = array_unique($values);
 => banana
 => apple
 => pear
Comments on this Question/AnswerHow can i remove the duplicate values from the database fetched result?
By: hussain, 11 Dec 2009 03:31:43
Reply to comments / post your own comment >>>
ASK A QUESTION
More arrays PHP QuestionsHow do I remove the first element from an array?
OK I've been trying to echo out the arrays "$people and $other people" using the for-each method in alphabetical order. but when i see what this displays it does it in some other order. THIS IS THE CODE PHP Ch8 Lab
How to point internal pointer to first element of an array?
How can I sort a multi-dimensional array?
I tried to query a table and retrieve some data, then I email them to an indivisual person with different data. However, I am only to send the 1st email, but not 2nd email. My query seem that not able to pass the 1st data found and pass it for 2nd time