Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/05/2012, 16:09
fcmonier85
 
Fecha de Ingreso: octubre-2009
Mensajes: 104
Antigüedad: 14 años, 6 meses
Puntos: 0
Como realizo la siguiente operacion con php

Hola a todos tengo la siguiente duda y pido vuestra ayuda para resolver loq que intento hacer

tengo un texto

<img src='images/hola.jpg' alt='hola'>Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí <b>Ejemplo aquí</b> Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí

Lo que quiero es sacar la "<img src='images/hola.jpg' alt='hola'>" y dejar el texto sin esa etiqueta solamente y dejar las demas etiquetas como <b>, etc... pero a la ves nesecito guardar <img src='images/hola.jpg' alt='hola'> en alguna variable.

Algo asi como que tener:

$texto = "Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí <b>Ejemplo aquí</b> Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí Ejemplo aquí ";

$imagen = "<img src='images/hola.jpg' alt='hola'>" ;

Saludos y espero me puedan ayudar...