Ver Mensaje Individual
  #3 (permalink)  
Antiguo 06/12/2011, 15:43
Avatar de humanista
humanista
 
Fecha de Ingreso: abril-2005
Mensajes: 878
Antigüedad: 19 años
Puntos: 15
Respuesta: Buscar con expresiones regulares

Código PHP:
Ver original
  1. $patron = "/$word/i";
  2. $sustitucion = "<b>/$word/i</b>";
  3. $description = preg_replace($patron, $sustitucion, $description);

lo intenté pero no me funcionó ¿?