There is a function that receives an array:
$(function() { $("#load").click(function(){ // Выполняем если по кнопке кликнули $.ajax({ url: "", // Обработчик type: "GET", // Отправляем методом GET data: {"num": num}, cache: false, success: function(response){ if(response == 0){ // Смотрим ответ от сервера и выполняем соответствующее действие alert('Записей нет!'); }else{ $("#comments").append(response); num = num + 1; } } }); }); }); The array content obtained by the var_dump function:
array (1) {[1] => array (5) {["Email"] => string (11) "admin @ admin" ["DateComment"] => string (10) "2016-05-04" [ "TimeComment"] => string (8) "01:41:28" ["Text"] => string (64) "Hello, I comment! Rporpopolpold" ["Mark"] => string (1) "5" }}
Question : how can I output the contents of this array in a loop to the page?
Instead of the contents of the array is written the word Array .