Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/08/2008, 13:15
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 meses
Puntos: 416
Respuesta: Cómo hacer resumen de las noticias

Tambien hay una forma de en vez de caracteres, mostrar cierto numero de letras u oraciones, como tu lo desees.

Código PHP:
<?php
$texto 
'The Dutch shop worker who said she may have seen Madeleine McCann has criticised detectives for not following up her story.

The possible sighting was reported to Portuguese officers in June last year - but it has only now been made public with the release of previously secret police files.

The girl entered Ms Stam\'s party shop in early May last year with a man and a woman and two other children, according to a witness statement to Dutch police.'
;

$oraciones preg_split('/\./'$texto);
$limite 1//Aqui pon el numero de oraciones -1. Osea, si ponemos 1 en realidad el limite seran 2 oraciones.

for($i=0$i<=$limite$i++)
{
echo 
$oraciones[$i].".<br>";
}
echo 
'<a href="noticia_completa.php?ID='.$row['ID'].'">Mas ...</a>';
?>

Última edición por Ronruby; 06/08/2008 a las 13:24