data. Script Languages 1. PHP. You can convert the PHP array in JSON format with jsonencode() function and return as a response. Set dataType: JSON when send AJAX request.