function htmlheader($pagetitle, $keywords)
{
if ($keywords == '')
{
$keywords = "Fixed, Keywords, for, generic, pages";
}
$stuff = "
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>".$pagetitle."</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<META NAME=\"DESCRIPTION\" CONTENT=\"Your site description of choice\">
<META NAME=\"KEYWORDS\" CONTENT=\"".$keywords."\">
<META NAME=\"COPYRIGHT\" CONTENT=\"yoursite.com\">
<META NAME=\"AUTHOR\" CONTENT=\"yoursite.com\">
</head>
<body>";
return $stuff;
}
Then use it like it like this:
<?php
$pagetitle = $queried['pagetitle']; //Whatever the page title from the database is.
$keywords = $queried['keywords']; //Whatever keywords from your database..
$headers = htmlheader($pagetitle, $keywords);
echo $headers;
?>
Play around with it to suit your needs 🙂