PHP runs faster when you run as much echoing as possible OUT of the realm where PHP will have to echo it out. It compiles the PHP code, then runs it, not running as it goes.
It makes work, especially when you're using a large number of tables, fast to code when you can just jump out of the scripting engine, dump it, then go back to the processing engine.... I just use <?=$var?> an awful lot 
So for example:
PHP Code:
<html>
<head>
<title><?=$title?></title>
</head>
<body background="<?=$image?>">
<table border="<?=$border?>">
<?php
$i = 0;
while($i < 50){
if(($i % 2) == 0){
$bgcolor = "red";
} else {
$bgcolor = "green";
}
?>
<tr bgcolor="<?=$bgcolor?>"><td><?=$i?></td></tr>
<?php
$i++
}
?>
</table>
</body>
</html>
Would in theory be faster than:
PHP Code:
echo("<html>
<head>
<title>$title</title>
</head>
<body background=\"$image\">
<table border=\"$border\">");
$i = 0;
while($i < 50){
if(($i % 2) == 0){
$bgcolor = "red";
} else {
$bgcolor = "green";
}
echo("<tr bgcolor=\"$bgcolor\"><td>$i</td></tr>");
$i++
}
echo("</table>
</body>
</html>");
?>
I personaly like to use Adoby GoLive 5.o for my web development, and use it to create complex table layouts and other stuff. I then insert into the <noedit> portion of GoLive my needed PHP and I get excellent results. If I remeber correctly it isn't enough of a gain for developers to worry about, if you code one way, then there is no reason to change because the gain is so minute.
Bookmarks