配列に返される SQL クエリである PHP ファイルから配列を取得する必要があります。でエンコードしてjson_encode();返しました。
これが私のJSファイルです:
$(document).ready(function() {
$('#indicators').change(function() {
    $('#countries').fadeIn('slow');
    var indic_val = $(this).val();
    var countries = $.ajax({
        url: 'scripts/chart_handler.php',
        dataType: "json",
        type: 'POST',
        data: {'indicator' : indic_val},
        async:false,
        success: (function ( data ){
            console.log(data);
            $.each(data, function(i,key) {
                $('#countries').append('<option value="'+ key +'">'+ key +'</option>');
                    });
               })
         });
    });
});
成功タグを取得していますが、データが null に戻ってきます。データ配列を取得するには何を使用する必要がありますか?