title: How to check how many times a number in an array appears in another PHP array
body: <p>Say for example I have an array that looks like this:</p>
  <pre><code>$array = array(1, 2, 3, 4, 5);
  </code></pre>
  <p>And I have another array (<code>$getreviewsarr</code>) that contains this:</p>
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [beoordeling] =&gt; 4
          )
  
      [1] =&gt; Array
          (
              [beoordeling] =&gt; 4
          )
  
      [2] =&gt; Array
          (
              [beoordeling] =&gt; 5
          )
  
      [3] =&gt; Array
          (
              [beoordeling] =&gt; 4
          )
  
      [4] =&gt; Array
          (
              [beoordeling] =&gt; 5
          )
  
      [5] =&gt; Array
          (
              [beoordeling] =&gt; 5
          )
  
  )
  </code></pre>
  <p>How can I check how many times the 1 occurs and the 2 and the 3 etc.</p>
  <p>So above example desired output would be:</p>
  <pre><code>1 - 0
  2 - 0
  3 - 0
  4 - 3
  5 - 3
  </code></pre>
  <p>I tried looping <code>$getreviewsarr</code> and using <code>array_count_values</code> on <code>beoordeling</code> but this doesn't show anything.</p>
  <pre><code>foreach($getreviewsarr as $occurence){
      print_r(array_count_values($getreviewsarr['beoordeling']));
  }
  </code></pre>