how to use php, html, css togther in a html template
<p>I work with conversion of a html template in to PHP, normally i code like this </p>

<pre><code>          &lt;div id="test"&gt;
        &lt;?php echo "&lt;p&gt;hello world&lt;/p&gt;"; ?&gt;
               &lt;/div&gt; 

            &lt;?php

     for($i=0;$i&lt;=8;$i++){

      echo "&lt;ul&gt;"; 
      echo "&lt;li&gt;link1";
      echo "&lt;li&gt;link2";
      echo "&lt;/ul&gt;"; 


     } ?&gt;
</code></pre>

<p>Suggest an easy way to use html tags in php code, other than using a  template system, Also tell me how to use  for, foreach loop, if else, along with html,CSS  tags</p>
