while($row = mysql_fetch_array($result)){
echo '<table><tr><td>' . $row["some"] . '</td><td>'.
$row["somenae"]. '<div>'. $row["some"] . '</div>
</td></tr></table>';
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.
I only want the values of variables of php and that should be inserted in between tables.
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.
There, much better. This’ll hardly get any prettier.
Whether this table structure makes sense is another topic.