On Thu, 11 Jan 2001, Alex Black wrote:
> like this:
>
> echo "<html>";
> echo "<head>";
> echo "<title>$title</title>";
> echo "<link rel='stylesheet' type='text/css'
> href='resources/css/$css.css'>";
> echo "<script src='/resources/js/base_lib.js'
> language='javascript'></script>";
> echo "</head>";
> echo "<body bgcolor='#EEEEEE' text='#000000' link='#003366' alink='#CCCCCC'
But why would you EVER write it like that.
if ($time_to_write_the_web_page) {
// write the web page.
echo "
<html>
<head>
<title>$title</title>
";
insert_css_js_here();
echo "
</head>
<body bgcolor=\"#EEEEEE\">
";
// yada yada
}
works fine and is pretty easy to read.
And my friend who was an html expert but not a php expert had no problem
reading my code.
Now this is NOT saying that extraction of markup from logic isn't a good
thing. I DO separate logic from markup. However, the beauty of PHP is that
markup doesn't need to be separated. And for many projects, its probably
overkill.
-burk
--
[EMAIL PROTECTED]
--
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]