i am new in jquery and ajax. I am really cant figured it out how can i show the array result send from the controller from json_encode. Below is the code in controller:
Controller
$totaldata['data'] = array('totalscore' =>$totalscore,'totalwicket' =>$totalwicket,'totalover' =>$totalover,'totalextra' =>$totalextra);
$this->output->set_output(json_encode($totaldata));
Jquery
$.ajax({
url: 'xxxxxxxxx',
type : 'POST',
data:{
xxxx : arrayValue,
id : matchid,
},
success: function(dataone){
//$('.addmatchsuccess').html(dataone).show();
//setTimeout(function() {location.reload() },3000);
}
});
Problem I want to get each array value to be placed in a input field in view ...which i couldnt figured out still how it gonna work. Please any help will be appreciated. Thank You