Dynamically create HTML via PHP or jQuery ajax? Which is faster or better method?
<p>Hi I just want to know what the best practice is for dynamically creating html. I can do it in two ways</p>

<p>Direct PHP</p>

<pre><code>&lt;div id='id-here'&gt;
    &lt;?php
        $user-&gt;id = $_GET['id'];
        $user-&gt;displayUserInformation( );
    ?&gt;
&lt;/div&gt;
</code></pre>

<p>jQuery ajax(js script called on page load)</p>

<pre><code>$.ajax({
    type: 'GET',
    url: 'inc/user_information.php',
    data: 'user_id=user_id', //assuming user_id value was already set.
    success: function(html)
    {
        $('#user_information').empty().html(html);
    }  
});
</code></pre>

<p>Note: This code doesn't exist and is purely for showing what I mean^^ I also know jQuery load, but prefer to use jQuery ajax for complex stuff.</p>

<p>Thanks!</p>
