I think he wants to get the TITLE tags form each document in a dir.
If this is so, you need to read each file and parse out whatever is in the TITLE tags. I think one of the ereg() functions should help. Sorry, I suck at regexes. You also need to look into fopen(), opendir(), and fread(). THe examples and user notes in the manual should have neough info to get your started.