I am trying to get value from dynamic created input field But its not display nothing in page controller.
jQuery code to append dynamic the input
var tableRow='<tr>';
tableRow+='<th><input type="text" class="form-control" name="ar[]" placeholder="Nom Articel" id="ar-'+i+'"></th>';
tableRow+='<th><input type="text" class="form-control" name="des[]" id="des-'+i+'" placeholder="Description"></th>';
$('#' + tableID + ' tbody').append(tableRow);
In the controller I try more then codes but nothing to display
I try to do that:
$in=$this->input->post("des");
if (is_array($in)) {
foreach ($in as $in => $k) {
echo "Owner Name is : " . $k . "<br/>";
}
} else {
echo "Owner is not array";
}
The array exist but empty not value of $k
And I try that
var_dump($this->input->post('des'));
the same nothing display
</div>