Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Search though a string array?

$
0
0

Hi,

 

I've just spent the last several hours speeding though coding a sudden idea I had. Now I'm feeling a bit brain dead and cannot get my head around the next part.

 

I have a string array, results[0] which is full of file names.  I need to create a quick way to search though those names, and list in order of relativity / order of closest match. The search term would normally be more than 1 word, so the ones that match all the words, then going on to the ones that match fewer words etc.

 

Although there are around 100 - 200 strings in the array, I would only need to display the top 5 results.

 

Any help would be appriated.

 

Thanks

 

Joe!


Viewing all articles
Browse latest Browse all 13200

Trending Articles