
29-03-2007, 23:48
|
|
|
|
חבר מתאריך: 21.08.06
הודעות: 801
|
|
|
תשובה
יש את הפונקציה הזאת:
קוד PHP:
function html2txt($document){ $search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA ); $text = preg_replace($search, '', $document); return $text; }
שמוציאה לך את הטקסט מתגיות ה HTML
מצאתי את הפונקציה הזאת באתר PHP.NET
_____________________________________
|