Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/02/2009, 13:48
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: borrar link en php

Cita:
$texto=str_replace("<br>","<br/>",$partido['fulltext']);
$prueba = preg_replace("/<a(.*)>(.*)<\/a>/i", "$2", $texto);
echo $texto;
Esta imprimiendo la variable $texto. Debes imprimir $prueba.

Hice este ejemplo y SI me funciono

Código PHP:
<?php 
$enlace 
'<a href="/Club/Players/Player.aspx?playerId=44231943" title="Sergėjus Misingevičius">Sergėjus Misingevičius</a>'
$prueba preg_replace("/<a(.*)>(.*)<\/a>/i""$2"$enlace);
echo 
$prueba;
?>