Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/09/2016, 08:59
rafaelg21
 
Fecha de Ingreso: junio-2008
Mensajes: 74
Antigüedad: 16 años, 8 meses
Puntos: 2
Respuesta: Extraer texto de una oracion dada una palabra a buscar

Gracias por responder, bueno es lo que mas omenos hice pero me falta cortar hacia atras .

function getSubContent($string, $length=NULL)
{

if ($length == NULL)
$length = 50;

$stringDisplay = substr(strip_tags($string),10,$length);

if (strlen(strip_tags($string)) > $length)
$stringDisplay .= '...';
return $stringDisplay;
}


me falta escortar hacia atras