Platinum Partner

Serving XHTML With PHP

How to correctly serve XHTML with PHP:


header('Vary: Accept');
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');
}


{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}