3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_POST['f__ves']) and isset($_POST['f__material'])) { $get_ves = $_POST['f__ves']; $get_material = $_POST['f__material']; foreach ($get_ves as $get_ves_item) { foreach ($get_material as $get_ves_item) { foreach ($product_id_arr as $prod_id) { $prod_get_attr = "SELECT * FROM `oc_product_attribute` WHERE (product_id, attribute_id, text) in( ('" . $prod_id . "', 28, '" . $get_ves_item . "'), ('" . $prod_id . "', 29, '" . $get_materail_item . "') )"; $query_prod_get_attr = mysqli_query($dbh, $prod_get_attr); foreach ($query_prod_get_attr as $product_id) { $product_val[] = $product_id['product_id']; } } } var_dump($product_val); } }

preferences:
28.94 ms | 404 KiB | 5 Q