I have a directory with a list of files, each one is a review and has variables for the review template set i.e. author, date, product (www.koston.net/reviews/decks/guymariano.inc). What I want to do is use php to read each file from the directory, get the variables and make a link with the product name and author such as.
<a href="/reviews/view.phtml?type=decks&review=$filename">$product</a>: $author.
Is there anyway I can use php to read the variables from a file then move to the next one, and have it overwrite. Psuedocode would be.
for each file
**??? include the file
read the variables and use them
move to next file
would that work? I worry that by including each file, it will increase memory usage. is there an uninclude function?
thank you
also how would I return the number of files in a given directory.....well i guess if a function returned an array with the name of each file, i could get the size of the array............
is there a faster method? Thank you