title: Count word frequency in a text?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2984786/php-sort-and-count-instances-of-words-in-a-given-string">php: sort and count instances of words in a given string</a>  </p>
  </blockquote>
  
  
  
  <p>I am looking to write a php function which takes a string as input, splits it into words and then returns an array of words sorted by the frequency of occurence of each word.</p>
  
  <p>What's the most algorithmically efficient way of accomplishing this ?</p>