I currently use this code to reload the PHP content in a DIV every 5 seconds. $clan_ is a variable set to load a specific PHP page in to the div, its a variable as the data comes from whatever the user selects on the page.
what I want to be able to do is change the value in the variable $clan_ based on an array from PHP so the div updates with different content every time the interval runs. I'm getting stuck at how to loop though the PHP each time the interval runs.
<script>
$(document).ready(function(){
$("#stats").load("<? echo $clan_ ;?>");
setInterval(function(){
$("#stats").load("<? echo $clan_ ;?>");
}, 5000);
});
</script>