Getting value from nested function

Getting value from nested function

I just can not get the value of arr. Any suggestion...

function my_f() {
 $.post('data.php', function(data) {
  var arr = $.makeArray ($("tr",data).map(function(){return $(this).attr("id")}).get());
return false; 
      //alert (arr)  //this work
});
return arr;
}

alert(my_f()); //return undefined