I was wonding what the code line would be to see if something is in a file?(would appriciate if you would include comments as i like to know what the code does so i can learn)
@balloonbuffoonApr 02.2006 — #[code=php] //get the entire contents of a file $contents = file_get_contents($filename);
//determine whether the string ($find) is anywhere in the file //strpos() finds the position of a string ($find) inside of another string ($contents) //if it is not found, it will return false if (strpos($contents, $find)===false) { //do something if string isn't in file } else { //do something if string *is* in file } [/code]
@NogDogApr 02.2006 — #no answers?[/QUOTE] Dude, it's Saturday night, Final 4 on TV, and you want a response after only 20 minutes - on a thread that's marked as resolved?
How about starting a new thread since it's a new question (and this one is resolved). I'll lock this thread so potential responses don't get spread between threads.