I am a bit confused here on how I implement an array into JS from PHP....
I\'m doing this for testing - eventually I\'ll use long polling or websockets if they get h
You can use AJAX (much easier). Make your PHP script echo $data, and then using jQuery ajax request the data in your HTML file as JSON. For example:
echo $data
$.ajax({ url: script_url, dataType: 'json', success: function(json) { ... } });