html parser

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
fredass
Forum Newbie
Posts: 12
Joined: Tue Apr 06, 2010 4:18 pm

html parser

Post by fredass »

Hi,
what tool(library) whould you recommend for parsing HTML code. I've been using Simle HTML Dom, but this library can't search in plain text. It works for tags, elements an so on.. I need to make search by text thats between tags.. for example: <h1> word1 word2 word3 </h1> and the function should be something like that: $res = find("word2"). I know that it can be done with standart php functions but I dont have time to write my own parser.. what would you remomend?

Thanks
katierosy
Forum Commoner
Posts: 27
Joined: Wed Apr 07, 2010 8:39 am

Re: html parser

Post by katierosy »

In between foreach loop you need to search the word1 to match.The existing library you have is a good one.
Post Reply