title: Frequency count all words in a single column in a a table using php
body: <pre><code>id | words                            | other
  1  | lorem ipsum                      | dsf
  2  | Lorem Ipsum is simply dummy      | sads
  </code></pre>
  
  <p>given this table now  I want a query in php that will give me frequency count in the entire words column</p>
  
  <p>Expected Output of this should be-</p>
  
  <pre><code>loreum-2
  ipsum-2
  is-1
  simply-1
  dummy-1
  </code></pre>
  
  <p>P.s.-I am passing the data as a whole 
  using-</p>
  
  <pre><code>$array = array($word);
  print_r(array_count_values($array)); 
  </code></pre>
  
  <p>it is giving me the output </p>
  
  <pre><code>lorem ipsum -1
  Lorem Ipsum is simply dummy-1
  </code></pre>
  
  <p>Please help me out I'm pretty much new to this.</p>