title: How to count multiple dates in php array
body: <p>How I can count same values in the Array. I have read about the <strong>array_count_values()</strong> but this function can only count  <strong>Integer or String values</strong> but My problem is that I want to count same dates in the Array, How can I count the same dates in the Array.</p>
  
  <p>I have tried this array_count_values() but this gives me this error. </p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Warning
  
  Message: array_count_values(): Can only count STRING and INTEGER values!
  
  Filename: controllers/Dashboard.php
  
  Line Number: 72
  
  Backtrace:
  
  File: /opt/lampp/htdocs/blink_app/application/controllers/Dashboard.php
  Line: 72
  Function: array_count_values
  
  File: /opt/lampp/htdocs/blink_app/index.php
  Line: 315
  Function: require_once
  </code></pre>
  
  <p>And Here Is my Array. </p>
  
  <pre><code>Array
  (
      [0] =&gt; stdClass Object
          (
              [id] =&gt; 1
              [saloon_staff_id] =&gt; 1
              [users_id] =&gt; 5
              [ref_id] =&gt; 1
              [date] =&gt; 2017-11-02
              [time_from] =&gt; 12:15:00
              [time_to] =&gt; 13:30:00
              [appointment_status] =&gt; 2017-11-23
              [saloon_services_id] =&gt; 3
              [saloon_profiles_id] =&gt; 1
              [phone_number] =&gt; 098098098
              [email] =&gt; SalmanIq@facebook.com
              [appointments_enabled] =&gt; 1
              [role_in_saloon] =&gt; Owner
              [name] =&gt; Salman Iqbal
          )
  
      [1] =&gt; stdClass Object
          (
              [id] =&gt; 2
              [saloon_staff_id] =&gt; 2
              [users_id] =&gt; 6
              [ref_id] =&gt; 2
              [date] =&gt; 2017-11-02
              [time_from] =&gt; 04:30:00
              [time_to] =&gt; 05:00:00
              [appointment_status] =&gt; 2017-11-25
              [saloon_services_id] =&gt; 2
              [saloon_profiles_id] =&gt; 1
              [phone_number] =&gt; 98790809809
              [email] =&gt; alludin@gmail.com
              [appointments_enabled] =&gt; 1
              [role_in_saloon] =&gt; No Access
              [name] =&gt; Alludin 
          )
  
      [2] =&gt; stdClass Object
          (
              [id] =&gt; 1
              [saloon_staff_id] =&gt; 1
              [users_id] =&gt; 7
              [ref_id] =&gt; 3
              [date] =&gt; 2017-11-04
              [time_from] =&gt; 03:00:00
              [time_to] =&gt; 03:30:00
              [appointment_status] =&gt; 2017-11-28
              [saloon_services_id] =&gt; 2
              [saloon_profiles_id] =&gt; 1
              [phone_number] =&gt; 098098098
              [email] =&gt; SalmanIq@facebook.com
              [appointments_enabled] =&gt; 1
              [role_in_saloon] =&gt; Owner
              [name] =&gt; Salman Iqbal
          )
  
      [3] =&gt; stdClass Object
          (
              [id] =&gt; 3
              [saloon_staff_id] =&gt; 3
              [users_id] =&gt; 7
              [ref_id] =&gt; 4
              [date] =&gt; 2017-11-28
              [time_from] =&gt; 01:00:00
              [time_to] =&gt; 02:00:00
              [appointment_status] =&gt; 2017-11-28
              [saloon_services_id] =&gt; 1
              [saloon_profiles_id] =&gt; 1
              [phone_number] =&gt; 9080809
              [email] =&gt; mubi@yahoo.com
              [appointments_enabled] =&gt; 0
              [role_in_saloon] =&gt; Owner
              [name] =&gt; mubassir
          )
  
  )
  </code></pre>
  
  <p>Any Help Will be Appreciated.</p>