$product_in_cart['rowID'], 'meta' => [ "img" => $product_in_cart['full_path'], "name" => $product_in_cart['productname'], "productcode" => $product_in_cart['productcode'], ], 'quantity' => $quantity, 'options' => [$options], 'options_price' => str_replace(',', '.',str_replace('.', '', number_format($options_price, 2,",","."))), 'options_weight' => $options_weight, 'shipping_price' => 0.00 ]; //------------------------------------------ //JSON_ENCODE //------------------------------------------ $messages = json_encode($products_validated, JSON_UNESCAPED_UNICODE); //Send results echo $messages; } else { //------------------------------------------ // Payload not correct //------------------------------------------ http_response_code(400); // Payload not correct } ?>