2009/3/26 George Langley <george.lang...@shaw.ca>:
> Hi all! Am building a Search feature following the excellent tutorial
> It loops through a page and stores the words found in a mySQL database.
> I have about 60 pages, and all of them share a number of common items
> like header, menu, footer, etc. These get added as includes. The result is
> other item in the menu, footer, etc. I would like to limit the word list to
> items found just in the page's unique content.
> I do have a div with an id of "divContent" for the actual content. So
> I could add an if statement to only start storing words found after the word
> "divContent" has been found. But, my question is:
> How do I STOP it? Is it permissible to add the id again in the closing div
> tag ie </div id="divContent">.
> If this is allowed, I could keep an eye out for that id again and stop
> it when found a second time, so that my list doesn't include items in the
> footer (which again is common to all 60 pages) or any other items outside of
> the content section. Or is there a better way to trigger the recording of
> words on/off? Thanks!
You can't have any extra info in a closing HTML tag. This problem is
usually handled using comments. Something like the following...
<!-- content begin -->
sofihsod hiosdh sdh gus us u sg
<!-- content end -->
You then just start with you see the begin comment and stop when you
hit the end comment.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php