|
Posted by Darko on 11/02/07 19:20
On Nov 2, 6:56 pm, Good Man <he...@letsgo.com> wrote:
> "Shelly" <sheldonlg.n...@asap-consult.com> wrote innews:13imgt9jf0fqrcd@corp.supernews.com:
>
> > Christoph Burschka wrote:
> >> shimmyshack wrote:
>
> >>> but your table should have table heading and body as well to be
> >>> properly accessibile.
>
> >> Also <strong> instead of <b>, I should think...
>
> > <b> works.
>
> yep, but <strong> is semantically correct, and the HTML 'should' be based
> on semantics and be using CSS used to style it.
>
> blah blah, have a good weekend!
Yes, I'm afraid Good Man is right. It's document logic that HTML
should be telling, not document style. The styles should be based on
CSS.
As for the whole concept, I find it better to have a separate file,
i.e. mail template, that you can file_get_contents from, replace a
placeholder with the generated table, and then send. You could
generate table either the way you already work or doing by Christoph
Burschka's advice, using the php's buffering, which I find nicer. You
can also use heredocs, which are a neat feature:
<?php
$html = <<<HERE_IS_END
<html>
<head>
<title>$title</title>
</head>
<body>
__PLACEHOLDER__
</body>
</html>
<<<HERE_IS_END;
// generate your $table
$html = str_replace( $html, "__PLACEHOLDER__", $table );
mail( ... );
?>
Navigation:
[Reply to this message]
|