Posts: 256
Location: Auckland, New Zealand
|
It's usually best to limit your usage of using echo for performance reasons, so just store everything in a string first then echo that string:
PHP Code:
<?php $tmp = '<tr class="text1"><td>'; if($emailel == 'email') { $tmp .= '<a href="mailto:'.$userel.'"><img src="emaillogo.gif"></a>'; else { $tmp .= ' '; } $tmp .= '</td><td>'.$bus.'</td><td>'.$busc.'</td></tr>'; echo $tmp; ?>
The only problem I noticed with Slick's code is he was using the constant name email not the string 'email' though if the constant email doesn't exist, PHP assumes the string 'email' but it's poor programming to rely on this.
Cheers,
MC
__________________
#------------------------------ signature---------------------------------------------------------------------------------#
Quote:
|
I am well recognised for what I don't do than what I do. Chores are just one of those things.
|
Last edited by mastercomputers; 02-17-2007 at 07:13 PM..
|