title: PHP Get most repeated value in Array
body: <p>I have an array within an array like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [name] =&gt; B
              [id] =&gt; 924572
          )
  
      [1] =&gt; Array
          (
              [name] =&gt; A
              [id] =&gt; 120689
          )
  
      [2] =&gt; Array
          (
              [name] =&gt; A 
              [id] =&gt; 120689
          )
  
      [3] =&gt; Array
          (
              [name] =&gt; C
              [id] =&gt; 919644
          )
  
      [4] =&gt; Array
          (
              [name] =&gt; A
              [id] =&gt; 120689
          )
  
      [5] =&gt; Array
          (
              [name] =&gt; B
              [id] =&gt; 924572
          )
  )
  </code></pre>
  
  <p>How can I get the most repeated value from object named <code>name</code> and <code>id</code>?</p>
  
  <p>I've already tried the code below but I'm getting an error: <code>Warning: array_count_values(): Can only count STRING and INTEGER values!</code></p>
  
  <pre><code>$count = array_count_values($info);
  arsort($count);
  $popular = array_keys($count);
  echo $popular[0];
  </code></pre>
  
  <p>Any fix regarding to this problem?</p>