Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/04/2016, 06:05
xerifandtomas
 
Fecha de Ingreso: octubre-2010
Ubicación: España
Mensajes: 1.007
Antigüedad: 13 años, 6 meses
Puntos: 123
Respuesta: Mostrar resultados de DB editado con Wysiwyg

Puedes limpiar las etiquetas html con strip_tags antes de cortar el texto.

Código PHP:
Ver original
  1. $notice = $row_noticias2['cuerpo_noticia'];
  2. $notice = strip_tags($notice);
  3. $max = 200;
  4. if (strlen($notice) >= 200){
  5. $row_noticias2['cuerpo_noticia'] = substr($notice, 0, 200);
  6. }
  7.  
  8. echo $row_noticias2['cuerpo_noticia']. "...";