Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/01/2012, 04:30
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 1 mes
Puntos: 62
Respuesta: Sacar texto con preg_match_all

Código PHP:
Ver original
  1. <?php
  2. $txt = '<a href="/inicio/tags/hola" class="tag" rel="nofollow">Hola</a>
  3. <a href="/inicio/tags/megaupload" class="link" rel="bookmark">jajad</a>
  4. <a href="/inicio/tags/mediafire" >Mslfjsd</a>';
  5.  
  6. preg_match_all("/\<a href=\"\/inicio\/tags\/(\w+)/", $txt, $match);
  7.  
  8. echo "<pre>";
  9. print_r($match[1]);
  10. echo "</pre>";
  11. ?>
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan