Search the Community
Showing results for tags 'words'.
-
hi, count number of words in textbox and then validate that the number of words should be between 400 to 1000. i googled alot... but didn't get an correct answer.... ??? need help!!! with regards, jasmeet.
-
Hi phpFreaks! To improve my php skills I do some private coding for my own. I did some small php scripts in the past, however never worked with the "search/DB" topic. This is where someone may help me a bit to give me a good start for my next project: "A scrabble search engine based on a dictionary with php & mysql" I'll try to do this as most efficient (fast) as possible. Requirements: > "field to enter random 1-14 letters" to search for words in the DB > "Dictionary in Database" or in file but I dont think that may be faster... My plan: > Put every single word into a database table called "words" (EDIT: maybe I should add a second row and save the "word length" of each word as well) > split up the 1-14 letters into a letter array > build a loop which groups the 1-14 letterArray together in all possible combinations: > 1st run: two-party groups -> check with "like" if its in the database for every single entry and put the result in a resultArray (EDIT: only check the words with the "word length" = 2) > 2nd run: three-party groups -> check with "like" if its in the database for every single entry and attach the result to the resultArray (EDIT: only check the words with the "word length" = 3) .....>14th run... > output resultArray I'm not looking for code parts, I'm just looking for a good concept to start with. Does someone have any recommendations on how I could do it better than the above? In my eyes there are too many DB search requests and maybe there is a better way to do it? Cheers Mike
- 6 replies
-
- dictionary
- words
-
(and 1 more)
Tagged with:
-
Hi, I'm about to make a translator site where people can order a translator to translate their documents. From the site people are able to upload their file then it would be connected to a translator/member of the site. The problem is how I make an application that count the price from the document. The most common way to rate the translation price is per word. So I need to know how many words in the document that a customer's uploaded. I thought there must be possible to count words from text file such as a word document. However, I couldn't find any way to get exact amount of a ms word 2003 document (.doc). I've found a way to count .docx, but not .doc. And there will be more files such as PDF, or rtf. I've seen another method which only count the file size, but I don't think it would give the same result for different document format. Or it is? The simple way I could think is to ask the visitors to copy/paste their text on a textarea, but I don't think this is the best way. Would someone gives me an advice how can I solve this? Thanks, ayok