Jump to content

preg_replace()


monkeypaw201

Recommended Posts

I have the string below which has variable text in between the div tags. I need to just remove the entire div (and the linebreak) IF its on the page. I've been told to try preg_replace() but after about 30 minutes at looking at tutorials I still can't make heads or tails of whats going on..

 

<br><div style='margin-right:10px;margin-top:4px;color:#a0a0a0;font-size:9px;text-align:right;font-style:italic'>CHANGING TEXT HERE</div>

 

I was hoping someone could explain how I'd go about making the preg_replace() for this one and may help me catch on..

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/162929-preg_replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.