Пожалуйста, попробуйте это:
<?php foreach ($data_ikan as $row) { ?>
<tr>
<td>
<input class="form-check-input" onclick="return show('<?=$row['id_data_ikan']?>')" type="checkbox" name="ikan[]" value="<?=$row['id_data_ikan']?>" id="checkbox<?=$row['id_data_ikan']?>"><?=$row['nama_ikan']?>
</td>
<td>
<input type="number" name="produksi<?=$row['id_data_ikan']?>" class="form-control form-input-sm my-1" id="produksi<?=$row['id_data_ikan']?>" placeholder="Kg" disabled>
</td>
</tr>
<?php } ?>
добавить javascript функция
<script>
function show(id) {
if(document.getElementById('checkbox'+id).checked){
document.getElementById("produksi"+id).disabled = false;
}else{
document.getElementById("produksi"+id).disabled = true;
}
}
</script>