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 can I reset an array in PHP?
im getting a Resource id #5 $rs_comp = mysql_query("select * from company where autoID='$row_settings[compid]'");
How can I reverse sort an array keeping the correlation between the index and value?
How do I remove and view the last element of an array?
How do I write my own sort function?