Is it possible to get a PHP array created on another page via AJAX? This is what I have so far:
index.php
$.ajax({
url: 'array.php',
type: 'GET',
complete: function(data) {
$('#div').html(data.responseText);
}
});
array.php
$arr = array('red', 'blue', 'green');
echo $arr; //echo it?
As you can see, I'm trying to load $arr into a div on index.php. Is this possible?