Advertisement
krot

delete hetml comment

Dec 3rd, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1.   $content = preg_replace("/<!--(.*?)-->/s", "", $content);
  2.   $content = preg_replace("/[\x0d\x0a]+/", " ", $content);
  3.   $content = preg_replace("/>\s{4,}</", "> <", $content);
  4.  $content = preg_replace('/(["\'])\s+\/>/', '\1/>', $content);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement