
-----------------------------------
Apage43
Fri Nov 28, 2003 12:45 pm

Searching stuff.
-----------------------------------
I want to search a text file for a string. Like a search engine, and want to get the line numbers of all matching lines, what would be the best way to do that? I've used grep to do it, but I think that makes my script OS dependent.

-----------------------------------
Blade
Mon Dec 01, 2003 3:23 pm


-----------------------------------
whatif you read each line into an array then search the array for the file and record the element number each word is in?

-----------------------------------
Homer_simpson
Mon Dec 01, 2003 10:31 pm


-----------------------------------
or make up a function like i made for turing called wordseparator or something that separates the works by space or any other separators... so u can search yer string for words or even sentences....

-----------------------------------
Blade
Tue Dec 02, 2003 12:24 pm


-----------------------------------
or you can use a function called explode()

goto http://php.net
