Created
August 17, 2012 11:16
-
-
Save ozkanozcan/3378071 to your computer and use it in GitHub Desktop.
PHP function html temizleme
This file contains 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 html2txt($t) | |
{ | |
$s = array('@<script[^>]*?>.*?</script>@si', | |
'@<style[^>]*?>.*?</style>@siU', | |
'@<[\/\!]*?[^<>]*?>@si', | |
'@<![\s\S]*?--[ \t\n\r]*>@' | |
); | |
$a = preg_replace($s, '', $t); | |
return $a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment