Skip to content

Instantly share code, notes, and snippets.

@greatb
Last active May 9, 2017 02:38
Show Gist options
  • Save greatb/1721252 to your computer and use it in GitHub Desktop.
Save greatb/1721252 to your computer and use it in GitHub Desktop.
Html Minifiy
function html_minifiy($str)
{
$str = str_replace("\t", " ", $str);
$str = str_replace(" ", " ", $str);
$str = str_replace(" ", " ", $str);
$str = str_replace(" ", " ", $str);
$str = str_replace(" ", " ", $str);
$str = str_replace("> <", "><", $str);
$str = str_replace("\n", "", $str);
$str = str_replace(" }", "}", $str);
$str = str_replace("{ ", "{", $str);
$str = str_replace("> <", "><", $str);
return $str;
}
@enlacee
Copy link

enlacee commented Feb 20, 2014

bueno me ayuda a recordar. :D php.net

@greatb
Copy link
Author

greatb commented Oct 15, 2015

es un placer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment