PHP with javascript code, live clock
<p>Hey I would to create a live clock to put it on my website. So I wrote a simple php with JavaScript code for that, here is it:  </p>

<pre><code>&lt;?php
    Function d1() {  
        $time1 = Time();  
        $date1 = date("h:i:s A",$time1);  
        echo $date1;  
    }
?&gt;  

&lt;script type="text/javascript"&gt;   
    window.onload = startInterval;  
    function startInterval() {  
        setInterval("startTime();",1000);  
    }
    function startTime() {  
        document.getElementById('qwe').innerHTML = '&lt;?php d1();?&gt;';  
    }  
&lt;/script&gt;  

&lt;div id="qwe"&gt;test&lt;/div&gt;  
</code></pre>

<p>When run this code the output like <code>"2:40:17 PM"</code>, the <code>div</code> refreshed every second but the problem is the time never changed.</p>
