On Fri, 12 Jan 2001, MR wrote:
> Philip Olson ...
> > You know what's annoying? This (yes, it happens) :
> >
> > echo ("<table bgcolor=\"#ffffff\">");
> > echo ("<tr>");
> > echo ("<td bgcolor=\"#eeeeee\" width=\"300\">");
> > print("Name :");
> > $name = 'johnny';
> > printf("%s %s %s","<b>","$name","</b>");
> > echo ("</td>");
> > echo ("<td bgcolor=\"#eeeeee\" width=\"300\">");
> > print("Title :");
> > $title = 'smith';
> > printf("%s %s %s","<b>","$title","</b>");
> > echo("</td>");
> > echo("</tr>");
> > echo("</table>");
>
> I'd suggest:
>
> echo "<table bgcolor='#ffffff'>
> <tr>
> <td bgcolor='eeeeee' width='300'>
> Name : ";
>
> $name = 'johnny';
>
> echo "<B>$name</B>
> </td>
> <td bgcolor='#eeeeee' width='300'>
> Title : ";
>
> $title = 'smith';
>
> echo"<B>$title</B>
> </td>
> </tr>
> </table>");
>
> This way, the code IS readable, for small-medium size echoing.
>
I on the other hand suggest something like this:
<?
$name = 'Johnny';
$title= 'Smith';
?>
<table bgcolor='#ffffff'>
<tr>
<td bgcolor='eeeeee' width='300'>
Name : <B><?=$name?></B>
</td>
<td bgcolor='#eeeeee' width='300'>
Title : <B><?=$title?></B>
</td>
</tr>
</table>
or this:
<?
$name = 'Johnny';
$title= 'Smith';
echo "
<table bgcolor='#ffffff'>
<tr>
<td bgcolor='eeeeee' width='300'>
Name : <B> $name </B>
</td>
<td bgcolor='#eeeeee' width='300'>
Title : <B> $title </B>
</td>
</tr>
</table>";
?>
I think is better (when possible) to format the data and then put it on
their way :)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: [EMAIL PROTECTED] | Heart of Men!" |
| [EMAIL PROTECTED] | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]