title: Using array_count_values and getting "Can only count STRING and INTEGER values!" error
body: <p>I'm trying to add 4 arrays into one array (<code>$all_prices</code>) and then check the values of each key in each individual array against <code>$all_prices</code> to make sure that they are unique. If they are not I want to add a <code>0</code> to the end of if to make it unique (so <code>0.50</code> becomes <code>0.500</code>).</p>
  
  <p>For some reason I'm getting the following error, despite the fact that I already changed the data type from decimal to varchar:</p>
  
  <blockquote>
    <p>array_count_values(): Can only count STRING and INTEGER values!</p>
  </blockquote>
  
  <p><strong><em>Edit</em></strong>
  Here is a snippet from dd($all_prices)</p>
  
  <pre><code>array(4) { [0]=&gt; array(9) { ["14.45"]=&gt; string(8) "sample 1" ["12.40"]=&gt; 
  string(8) "sample 2" ["14.13"]=&gt; string(8) "sample 3" ["15.11"]=&gt; 
  string(8) "sample 4"
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>$all_prices   = [$list_a_prices, $list_b_prices, $list_c_prices, $list_d_prices];
  $price_count  = array_count_values($all_prices);
  
  foreach($list_b_prices as $key =&gt; $value){
      if($price_count[$key] &gt;= 2){
          $key . "0";
      }
  }
  </code></pre>
  
  <p>Where am I going wrong? Is there is a way to leave the data type as Decimal?</p>