![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
11/06/2009, 02:37
|
| | Fecha de Ingreso: diciembre-2007
Mensajes: 34
Antigüedad: 17 años, 2 meses Puntos: 1 | |
Respuesta: alguna funcion que muestee solo Texto sin el html en php Buenas queria aportar mi granito de arena, yo tambien estuve buscando esto pero con las paginas con javascript o css te imprime todo, entonces encontre esta funcion a ver si te sirve
function html2txt($document){
$search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA
);
$text = preg_replace($search, '', $document);
return $text;
} |