setInterval(function () {
$.ajax({
url: "cls.php",
type:"POST",
dataType: "JSON",
success:function (user) {
if (!Array.isArray(user) || !user.length) {
div.innerHTML ="<div></div>";
}else
for (var i=0; i<user.length; i++) {
var f = user[i] ;
div = document.getElementById('<?=$sex?>');
div.innerHTML ="<div><img style='border-radius: 5%' src="+f.url+" ></div>";
console.log(f);
}
}
});
},1000);