title: Unable to add the values of the same array in php?
body: <p>I have a following data that contains a array. What I want to do is add the visitor_cv values together if 
  the visitor_day, the visitor_id, and the type is the same . If you see the following code below it's like array 6 &amp; 13 has the same data and the 23 and 36 has the same data as well. I want simply add the values of the visitor_cs to have 2. But I have no idea how I will be able to do that logic. I would love to hear from you! </p>
  
  <pre><code>Array
  (
      [6] =&gt; Array
          (
              [type] =&gt; mail
              [visitor_id] =&gt; 4
              [visitor_day] =&gt; 20180516
              [visitor_cv] =&gt; 1
          )
  
      [13] =&gt; Array
          (
              [type] =&gt; mail
              [visitor_id] =&gt; 4
              [visitor_day] =&gt; 20180516
              [visitor_cv] =&gt; 1
          )
  
      [23] =&gt; Array
          (
              [type] =&gt; skype
              [visitor_id] =&gt; 4
              [visitor_day] =&gt; 20180516
              [visitor_cv] =&gt; 1
          )
  
      [36] =&gt; Array
          (
              [type] =&gt; skype
              [visitor_id] =&gt; 4
              [visitor_day] =&gt; 20180516
              [visitor_cv] =&gt; 1
          )
  </code></pre>
  
  <p>I want the above result to be like</p>
  
  <pre><code> Array
  (
      [type] =&gt; mail
      [visitor_id] =&gt; 4
      [visitor_day] =&gt; 20180516
      [visitor_cv] =&gt; 2
  )
  
  
   Array
  (
      [type] =&gt; skype
      [visitor_id] =&gt; 4
      [visitor_day] =&gt; 20180516
      [visitor_cv] =&gt; 2
  )
  </code></pre>