Remove waste whitespaces from HTML-code
Snippet for removing waste whitespaces from HTML-code.
function minify($sHTML)
{
return preg_replace('/([\s\t\n]*)(<.*>)([\s\t\n]*)/', '$2', $sHTML);
}
Url: http://sklueh.de/2012/06/entfernen-von-uberflussigen-whitespaces-aus-html-code-mit-php/
Language: PHP | User: sklueh | Created: Sep 24, 2013