View Single Post
Old 02-24-2005, 05:07 PM  
NetRodent
Confirmed User
 
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
[QUOTE=gezzed]Here's the snag, I have 50,000 entries in the .txt file so a simple foreach loop takes way too long./QUOTE]

Its not the foreach that's taking the time. Its the pattern matching on 50,000 entries.

The easiest way would be with a database, properly indexed.

If you're stuck on storing your data in text files, you could create a new set of textfiles to index what's in the main text file.
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats."
--H.L. Mencken
NetRodent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote