Yes, this is definitely possible. You'll need to have the php function in a separate php file. Here's an example using $.post:
$.post(
'yourphpscript.php', // location of your php script
{ name: "bob", user_id: 1234 }, // any data you want to send to the script
function( data ){ // a function to deal with the returned information
$( 'body ').append( data );
});
And then, in your php script, just echo the html you want. This is a simple example, but a good place to get started:
<?php
echo '<div id="test">Hello, World!</div>';
?>