Created
March 29, 2017 15:39
-
-
Save rajvanshipradeep15/83e8bd2bb3d5e8b69f392ba241e6f0fd to your computer and use it in GitHub Desktop.
clean html when compiler process only php code not html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clean($str) | |
{ | |
$str = utf8_decode($str); | |
$str = str_replace(" ", "", $str); | |
$str = preg_replace("/\s+/", " ", $str); | |
$str = trim($str); | |
return $str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment