I'm struggling with the next problem: I have an ajax request that passes a variable to a PHP file. The PHP processes the variable and returns with an array. I need to get back that array so I used the AJAX success callback function but I can only print out the array, nothing more. I want to use that array.
$.ajax({
method: 'POST',
url: "process.php",
data: { data: data},
success: function(array)
{
<?php echo $GLOBALS['glob']; ?> = data;
}
});
Even though if I ref to $GLOBALS['glob'] later, it says its an undefined variable. :S please help!