I am writting a PHP script to search for a directory, or at least I am trying too, but I haven't the slightest where to start, what commands to use and what sort of expressions to use. I want to be able to put a word into a form, and find the closest matches alphabetically. I know how to write a statment to return the exact dir that matches a word, but I want to be able to match similar dirs too. for example,
Lets say there are directories: home, files, jack, jim
Now lets say I enter the word john, it will return jack and jim in that order. if I put jack in, it will return jack jim in that order, if i put jim, it will return jim. if i but house, it will return home.
I think that sums up the jist of it. I am some what new at php, but learning fast. I can write the script i just have no idea what commandds and how to use them. any help on this would be great.