title: Creating html tags using php but is there a way to avoid it in this scenario?
body: <pre><code> while($row = mysql_fetch_array($result)){
   echo '&lt;table&gt;&lt;tr&gt;&lt;td&gt;' . $row["some"] . '&lt;/td&gt;&lt;td&gt;'. 
        $row["somenae"]. '&lt;div&gt;'. $row["some"] . '&lt;/div&gt;
         &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';
  </code></pre>
  
  <p>Above is my php script and the array size is some 50 to 100 or may be 1000 also, so looping through 50 to 100 and creating html tags using php, Is it a good practise here? how can I avoid it. I don't want to create html tags like tables using php here but I have left no choice with.</p>
  
  <p>I only want the values of variables of php and that should be inserted in between tables.</p>
  
  <p>How can I avoid creating html tags using php in this type of scenario? I did  lots of my code using this way and some of them said why do you make server busy by creating unnecessary tags here but I did not find any better solution than this.</p>