Is there any difference in speed/ performance between:
while($i=mysql_fetch_array($result)) {
if ($i['deleted'] == '1') {
$image = 'd';
$color = 'f2f2f2';
} else {
$image = 'n';
$color = 'ff0000';
}
?>
<tr bgcolor="#<?=$color?>">
<td>
<img src="<?=$image?>.jpg" alt="" />
</td>
</tr>
<?php
}
and:
while($i=mysql_fetch_array($result)) {
?>
<tr bgcolor="#<?php if ($i['deleted'] == '1') { echo 'f2f2f2'; } else { echo 'ff0000';?>">
<td>
<img src="<?php if ($i['deleted'] == '1') { echo 'd'; } else { echo 'n';?>.jpg" alt="" />
</td>
</tr>
<?php
}
I am using the first one, but don't know if it's the best.