返回HTML Ajax

below is my code to fetch a webpage html....

$.ajax({
    url: 'server.php',
    method: 'POST',
    dataType : "html",
    data: {name: 'film'},
    success: function(data) {
     console.log(data);
    });
});

server.php wil return ...

return <div>some html contents</div>

I want to show this in ajax console success function....now its not displaying anything in console.. how do we fix this....

Credit goes to @Rayon Dabre , As he mentioned, I have solved the problem.... by writing echo <div>some html contents</div> instead of return <div>some html contents</div>