function sample(){
$.ajax({
url: "ren.php",
dataType: "text",
cache: false,
success: function(data, textStatus){
var str=data;
str="<h1>"+str+"</h1>";
$("#memo").html(str);
},
error: function(xhr, textStatus, errorThrown){}
});
}
<?php
$sx=0;
$fp = fopen("sample.txt", "r");
while ($line = fgets($fp)) {
$sx=$sx+1;
$p[$sx]=$line;
}
print $p[3];
fclose($fp);
?>