title: Warning: A non-numeric value encountered PHP MySQL
body: <p>I get a warning:</p>
  
  <blockquote>
    <p>Warning: A non-numeric value encountered in C:\xampp\htdocs\epard\cart.php on line 110</p>
  </blockquote>
  
  <pre><code>$cartOutput = "";
  $cartTotal = "";
  $pp_checkout_btn = '';
  $product_id_array = '';
  if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) &lt; 1) {
    $cartOutput = "&lt;h2 align='center'&gt;Jūsų krepšelis tuščias&lt;/h2&gt;";
  } else {
  
    // Start the For Each loop
  
    $i = 0; 
    foreach ($_SESSION["cart_array"] as $each_item) { 
      $item_id = $each_item['item_id'];
      $sql = mysqli_query($con, "SELECT * FROM prekes WHERE id='$item_id' LIMIT 1");
      while ($row = mysqli_fetch_array($sql)) {
        $pavadinimas = $row["pavadinimas"];
        $kaina = $row["kaina"];
        $gamintojas = $row["gamintojas"];
      }
      $pricetotal = $kaina * $each_item['quantity'];
      $cartTotal = $pricetotal + $cartTotal;
      setlocale(LC_MONETARY, "en_EU");
  
      // Create the product array variable
  
      $product_id_array .= "$item_id-".$each_item['quantity'].","; 
  
      // Dynamic table row assembly
  
      $cartOutput .= "&lt;tr&gt;";
      $cartOutput .= '&lt;td&gt;&lt;a href="product.php?id=' . $item_id . '"&gt;' . $pavadinimas . '&lt;/a&gt;&lt;br /&gt;&lt;img src="inventory_images/' . $item_id . '.jpg" alt="' . $pavadinimas. '" width="40" height="52" border="1" /&gt;&lt;/td&gt;';
      $cartOutput .= '&lt;td&gt;' . $gamintojas . '&lt;/td&gt;';
      $cartOutput .= '&lt;td&gt;€' . $kaina . '&lt;/td&gt;';
      $cartOutput .= '&lt;td&gt;&lt;form action="cart.php" method="post"&gt;
      &lt;input name="quantity" type="text" value="' . $each_item['quantity'] . '" size="1" maxlength="2" /&gt;
      &lt;input class="btn btn-primary btn-sm" name="adjustBtn' . $item_id . '" type="submit" value="change" /&gt;
      &lt;input name="item_to_adjust" type="hidden" value="' . $item_id . '" /&gt;
      &lt;/form&gt;&lt;/td&gt;';
      //$cartOutput .= '&lt;td&gt;' . $each_item['quantity'] . '&lt;/td&gt;';
      $cartOutput .= '&lt;td&gt;€' . $pricetotal . '&lt;/td&gt;';
      $cartOutput .= '&lt;td&gt;&lt;form action="cart.php" method="post"&gt;&lt;input class="btn btn-danger btn-sm" name="deleteBtn' . $item_id . '" type="submit" value="X" /&gt;&lt;input name="index_to_remove" type="hidden" value="' . $i . '" /&gt;&lt;/form&gt;&lt;/td&gt;';
      $cartOutput .= '&lt;/tr&gt;';
      $i++; 
  } 
  setlocale(LC_MONETARY, "en_US");
  $cartTotal = "&lt;div style='font-size:18px; margin-top:12px;' align='right'&gt;Krepšelio suma : ".$cartTotal." EUR&lt;/div&gt;";
  }
  </code></pre>
  
  <p>And important part is that cartTotal works perfectly. It counts the price of every item, but it still show that warning. Is there any way to remove that warning?</p>