title: count items for each category sql php
body: <p>using sql and php.</p>
  
  <p>I have the following table schema</p>
  
  <pre>id | item_id | category_id</pre>
  
  <p>I've sample data in this table</p>
  
  <pre>
  id  | item_id | category_id
  
  1   | 1525       | shoes
  2   | 2565       | shoes
  3   | 2558       | shirts
  4   | 2885       | shirts
  5   | 3545       | shirts
  6   | 1885       | belts
  </pre>
  
  <p>Requirement: I need to count how many items are in each category, and echo the count and item_ids</p>
  
  <p>for example "category shoes has 2 items - 1525,2565" 
  I need to do this for all categories.</p>