PHP question working with text files?

  • Thread starter Thread starter Da Geek
  • Start date Start date
D

Da Geek

Guest
Ok, I have a php script that logs using text files. So one string per line. I want another script that counts how many times that string has been used. Say i put in "tinker", then "john" then "john" then "john", and it logs it as "tinker<line>john<line>john<line><john><line>". I want a script that will say that i used tinker once, and john three times. So if i put in "tinker" the output will be "3". I would love it if someone had an answer for this! Thanks!

If you want it simpler... its basically counting lines which has a particular string in it.
 
Back
Top