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...