0

I'm learning about HTML parsing in PHP and I'm trying to use it to get the content in-between an opening and closing tag.

I've read the documentation and can't figure out how to do it.

I know how to get elements and get their attributes, but not what they contain.

How can I do that with Dom Document in PHP?

For example getting the contents inside the opening <title> and closing </title> ?

Irfan Mir
  • 2,107
  • 8
  • 27
  • 33
  • Please refer to this page. http://stackoverflow.com/questions/3404433/get-content-within-a-html-tag-using-php-and-replace-it-after-processing – u54r May 24 '13 at 21:14

1 Answers1

0

You can try this library, it's really helpful and easy to use.

http://simplehtmldom.sourceforge.net/

Genesor
  • 153
  • 1
  • 12