Page 1 of 1

Remove part of a String. - string value between tags

Posted: Mon Dec 22, 2008 4:46 am
by zerandib
Hello,

Code: Select all

 
$allvalue = "</table> </div></div></div></div></div></div> [b]<div id="headerhost" valign=center> <iframe src="http://nobaaaahost.com/cgi/bg/headerhost.iframe.cgi" width=100% hspace=0 vspace=0 frameborder="0" scrolling="no" allowautotransparency=true></iframe> </div>[/b] <div id="foothost" valign=center> <iframe src="http://nobaaaahost.com/cgi/bg/foothost.iframe.cgi" width=100% hspace=0 vspace=0 frameborder="0" scrolling="no" allowautotransparency=true></iframe> </div> <script> for (var ems = document.embeds, i = 0, em; em = ems[i]; i++) { em.setAttribute('wmode', 'transparent'); var nx = em.nextSibling, pn = em.parentNode; pn.removeChild(em); pn.insertBefore(em, nx); } </script> <!end nobaaaahost.com bottom ad> </body> </html>"
 

How to remove the this line from the above $allvalue??

<div id="headerhost" valign=center> <iframe src="http://nobaaaahost.com/cgi/bg/headerhost.iframe.cgi" width=100% hspace=0 vspace=0 frameborder="0" scrolling="no" allowautotransparency=true></iframe> </div>


Thanks.

Re: Remove part of a String. - string value between tags

Posted: Mon Dec 22, 2008 6:32 am
by Apollo

Code: Select all

$allvalue = str_replace( 'whatever-you-want-to-remove' , '' , $allvalue );