Javascript:
function setitem(id, phpvalue){
var data = {
Sub_category: $("#Subcategory").val()
}
var formsubmission = '<?php echo base_url().'index.php/AJAX/get_item'?>';
$.ajax({
method: "POST",
url: formsubmission,
data: data,
success: function(response){
$("#Item_"+id).find('option').not(':first').remove();
$("#Item_"+id+" option:first").after(response);
$("#Item_"+id).prop("disabled", false);
var item_value = '<?php echo $Items["+phpvalue+"]["Item"]?>';
$("#Item_"+id).val('<?php echo $Items[0]["Item"]?>');
$("#Item_"+id).selectpicker('refresh');
}
})
}
Anyone can please tell me How can I use phpvalue as an array index?