note 83972 added to function.array-count-values

From: Date: Sat, 21 Jun 2008 04:19:11 +0000
Subject: note 83972 added to function.array-count-values
Groups: php.notes 
Request: Send a blank email to php-notes+get-140646@lists.php.net to get a copy of this message
Follow an array_count_values() call with a call to array_keys() to give an array sorted by the frequency of its values (with redundancy automatically removed--no need for a call to unique()). $namearray = array('Adam', 'Bill', 'Carl', 'Adam', 'Bill', 'Dan', 'Adam'); $newarray = array_count_values($namearray); $sortedarray = array_keys($newarray); ---- Server IP: 209.41.74.194 Probable Submitter: 206.57.41.114 ---- Manual Page -- http://www.php.net/manual/en/function.array-count-values.php Edit -- https://master.php.net/note/edit/83972 Del: integrated -- https://master.php.net/note/delete/83972/integrated Del: useless -- https://master.php.net/note/delete/83972/useless Del: bad code -- https://master.php.net/note/delete/83972/bad+code Del: spam -- https://master.php.net/note/delete/83972/spam Del: non-english -- https://master.php.net/note/delete/83972/non-english Del: in docs -- https://master.php.net/note/delete/83972/in+docs Del: other reasons-- https://master.php.net/note/delete/83972 Reject -- https://master.php.net/note/reject/83972 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140646) next »