<?php foreach ($fruits as $fruit) { ?>
<select name="fruits[]">
<option value="">Apple</option>
<option value="">Banana</option>
<option value="">Orange</option>
</select>
<input type="text" name="quantity" value="" />
<?php } ?>
<script>
$("select[input='fruits[]']").change(function () {
// how to get the fruits array index
// how to get the fruits array value
});
</script>
How to know the specific index and value selected in fruits array selectbox?
Thanks in advance!