How to recieve a PHP array from an AJAX request

How to recieve a PHP array from an AJAX request

Can anyone tell me how I can recieve a PHP array after running $.ajax()? For example:

//PHP: file.php
<?php
//sample array
$myarray = array('food', 'sports', 'other stuff');
echo $myarray;
?>


//JQuery
$.ajax({
      url: 'file.php',
      type: 'POST',
      success: function(data){
            console.log(data); //Comes out "Array" instead of the contents of the array. How do I do this?
      }
});