view
<form id="formx">
<tr id="massage">
<td style="width: 10%"><?php echo "Цена дроп"?></td>
<td style="text-align: right; width: 10%">
<?php foreach($price_cost as $result){ ?>
<?php echo $result['code'];?>:<input type="text" name="cost_price_drop[]" class="cost_price_drop[]" size="8" value="<?php echo $result['price_cost']; ?>"><br>
<?php } ?>
</td>
<td style="width:5%"><input type="text" id="price_ukraine" value=""></td>
<td><input type="button" id="button_drop"></td>
</tr>
</form>
scrypt
$('#button_drop').on('click', function () {
var ms = $(".cost_price_drop").val();
console.log(ms);
$.ajax({
type: 'POST',
url: 'index.php?route=catalog/product/massage&token=<?php echo $token; ?>',
data:{
"massage":ms
},
success: function (data) {
$('#massage').html(data);
}
});
});
Но приходит только одно значения, как сделать что бы приходило со всех полей?