Searching and Writing HTML doc

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nickison99
Forum Newbie
Posts: 1
Joined: Wed May 18, 2005 4:12 pm

Searching and Writing HTML doc

Post by nickison99 »

Hi All,
I have a plain html document that is included into a PHP4 page, and I would like to be able to do the following to it:
1) Search the HTML page located on the same server for a given string ("<a name="top"></a>" lets say) and remove all instances of it.
2) Search the HTML page for a given string (A date similar to "Wednesday, May 18, 2005")
3) Be able to write some html tags in the html page ("<a name="top"></a>" lets say) directly after the date in the source
4) Save it, display it etc..

Any ideas about how I could go about it would be great. I dont necessarily need exact code, but some guidance would be good as well. Thanks.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Regular Expressions for 1-3.
4 is very generic. There's many ways you can do this.
Post Reply