if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) {
header('Content-Type: application/xhtml+xml; charset=utf-8');
}
else {
header('Content-Type: text/html; charset=utf-8');
}
$doctype = '';
$head= '';
$head .= ' ';
$head .= ' Document Type Declaration Example ';
$head .= ' ';
$body = ' ';
$body .= ' The content of the page goes here.
';
$body .= ' ';
$footer = '';
echo $doctype;
echo $head;
echo $body;
echo $footer;
?>