Most popular word sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible in PHP to sort an array by most frequently occurring word / phrase, 2nd most frequently occurring, third, etc.

An example array is:

Array ( [1] => Parable [2] => Mustard [3] => Seed [4] => Parable [5] => Good [6] => Samaritan [7] => Parable [8] => Workers [9] => Vineyard [10] => Parable [11] => Lost [12] => Sheep [13] => Parable [14] => Lost [15] => Coin [16] => Parable [17] => Prodigal [18] => Parable [19] => Sower [20] => Parable [21] => Weeds [22] => Parable [23] => Hidden [24] => Treasure [25] => Parable [26] => Parable [27] => Wedding [28] => Banquet [29] => Parable [30] => Virgins [31] => Parable [32] => Bags [33] => Gold [34] => Parable [35] => Yeast ) 

The most popular word is “Parable”.  I would like it to be the first result.  
Then the second most popular word is “Lost”.  
Then all the remaining words are only used once.  

Ron

The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info  

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux