Which is Best Coding?
Each of these sets of code will produce the same results in the display.
Question: When carried out in a large application, which is better? Is there a performance difference in the two different methods?
The benefit of the first one is that I can control all of the display (the HTML) in Dreamweaver and actually see what I'm doing, but I wonder if there is a performance hit or some other problem.
Thanks for your insights.
Comments please.
Jeff
PHP Code:
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><?php echo $item1; ?></td>
<td><?php echo $item2; ?></td>
<td><?php echo $item3; ?></td>
</tr>
<tr>
<td><?php echo $item4; ?></td>
<td><?php echo $item5; ?></td>
<td><?php echo $item6; ?></td>
</tr>
</table>
PHP Code:
<?php
echo "<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">";
."<tr>"
."<td>".$item1."</td>"
."<td>".$item2."</td>"
."<td>".$item3."</td>"
."</tr>"
."<tr>"
."<td>".$item4."</td>"
."<td>".$item5."</td>"
."<td>".$item6."</td>"
."</tr>"
."</table>";
?>