i am trying to write a program for anagram finder in php mysql.. i have dictionary in database which has only one field named 'word' and it contains 500000 rows.
by using php i tried to pull words one by one from database.. After getting a word i created 2 for loops which performs character by character comparison..
for example.. let the input word be 'abcdef'..
consider i am fetching the word 'fade' from database..
i am writing a loop and checking whether the word fade is in abcdef .. if yes i am printing the word.. if not, i will fetch next word from database..
i wrote the code.. but i am getting an empty page as output.. pls help..
i have one more question. is there any other way to find the substring of a word without using character by character comparison?
for example : if my input is fedcba.. i sort it as abcdef.. and dictionary word is fade and i sort it as adef.. is thr any function to find whether adef is a substring of abcdef..