title: PHP Warning: array_push() expects parameter 1 to be array, string given in
body: <p>I have something wrong with:</p>
  <pre><code>PHP Warning:  array_push() expects parameter 1 to be array, string given in
  </code></pre>
  <p>the code in function.php is:</p>
  <pre><code>global $wpdb;
      $i=0;
  $key_count=array();
      
      $order_id  = $order-&gt;get_id();
      $order = wc_get_order($order_id);   
          foreach( $order-&gt;get_items() as $item_id =&gt; $item ){
      //Get the product ID
      $product_id = $item-&gt;get_product_id();
        $key_count[$i] = $wpdb-&gt;get_var(&quot;SELECT count(license_key) FROM bff_lmfwc_licenses where product_id='$product_id'and order_id is NULL&quot;);
        $i=$i+1;
          array_push($key_count[0],$key_count[$i]);
          }
  </code></pre>
  <p>Can you see my mistake?</p>