I want to populate Ajax response and set a part of it into a new variable.
$ . ajax ({
type : "POST" ,
url : " ajax.php" ,
data : "id=" + id ,
success : function ( data ){
$ ( "#response" ). html ( data );
var new_var = $new_result;
}
});
========== [[ ajax.php]]
$new_result = 'hahahha';
echo $all_names;
echo $all_address;