Returning the text within tags
Posted: Tue Jul 01, 2003 11:44 pm
Hi, I'm writing a blog application in PHP, and I'm having some problems with getting info from the text files that the entries are saved in.
The I have the text formatted, each field of info is suyrrounded byt descriptive tags (Kinda like XML)
So a typical text file would be like:
Is there a way to search for a specific set of tags, and return only the stuff in between it to a string? It seems you could use something like the strstr() function to do something like this, but I'm not sure. Any help would be apprecaited.
The I have the text formatted, each field of info is suyrrounded byt descriptive tags (Kinda like XML)
So a typical text file would be like:
Code: Select all
<title>This is the Entry's Title</title>
<date>Day Year Month</date>
<text>blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</text>