Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/05/2013, 14:31
red_hunter3
 
Fecha de Ingreso: mayo-2013
Mensajes: 3
Antigüedad: 11 años
Puntos: 0
Respuesta: Analizar/y reemplazar un texto PHP/MySQL

gracias por el link...

Pero no consigo hacer que mi función pathFromId() funcione con el preg_replace()
tengo esto:

Código PHP:
Ver original
  1. $from = array(
  2.    "/\[img=\"(.*?)\"\]/is"
  3. );
  4. $to = array(
  5.     "<img src=\"".pathFromId(."$1".)."\" />"
  6. );
  7. $text = preg_replace($from, $to, $text);