Ajax gets return array data and prints the particular position to print out with a foreach loop. But without any third file, it is possible?
I have all array data in the third file and all data to return an ajax and print that id through in php file.
My all return data associative array.
/* Handler file */
foreach ($data as $d) {
echo '<li>' . $d['name'] . '</li>';
}
/* ajax file */
function (data) {
$('#id').html(data);
}