You can, and this is returning the data you expect. You can test this by looking at the response in the Net tab of your browser's developer tools.
It isn't being displayed in
getJSON requires that the response it gets is JSON and you are responding something that claims to be an HTML document (the default for PHP) but which contains the output of
print_r (which isn't valid HTML or JSON).
Send JSON back and it will work:
<?php header("Content-Type: application/json"); echo json_encode($_GET['sendArray']); ?>