We have html page, it has many code inside.
Sometimes it has block #container, sometimes not.
All code of this page is inside $page variable.
How do I:
- check, is there block with
id="container"? - if html page has
#containerinside, then get it contents of this block and write to a variable$container.
Task should be done by php.
id="container"then only take the performance hit of firing up the parser if necessary.