Matching strings in a flat/text file?

From: Date: Tue, 23 Oct 2001 05:09:56 +0000
Subject: Matching strings in a flat/text file?
Groups: php.general 
Request: Send a blank email to php-general+get-71894@lists.php.net to get a copy of this message
Hey everyone, Anyone out there know how i could do this: I have a client who is an import car tuner. They would like to feature the cars they work on in their website. Instead of creating a new .html or .php file for every car they add to include the background setup, and the general content (type of car, owner, etc...) i want to put the information in to text file and search for it in there. So that's where i need help. I want to be able to put the info into a text file and pass the string to search for through the URL, then match everything between that line and an ending line in the text file, and print that out to the browser. Example: I want to pass a string using the URL (blah.php?car=civic_si) then search for ##civic_si in the text file, and print everything until it finds ##end. So the text file will look like this: ##civic_si This is my content, blah blah ##end ##nissan This is more content... yadda yadda ##end Any ideas on how i can do this??? //Nick Richardson //esoteric.web@gte.net

« previous php.general (#71894) next »