Re: Word List

From: Date: Wed, 01 Nov 2000 10:11:27 +0000
Subject: Re: Word List
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-23133@lists.php.net to get a copy of this message
Thanks, the script is just what I needed, but I haven't got Unix/Linux installed. I'm working in a W98 environment. But is there a possibility to download the file(s) from the web seperatly? > > Hi, > > I'm currently developing a website using PHP and I need either a Prog that > > can format Word lists or a finished Word List containing all words with up > > to 7 letters. > > > > Any sugestions? > > In what language? Try /usr/dict. If you have it installed, you should > have a huge list. Here's a short script to pull them out: > > <?php > error_reporting(E_ALL); > > $maxwordlen = 7; > $all_words = file('/usr/dict/words'); > while (list(, $word) = each($all_words)) { > /* Add one to the length to include the newline. */ > if (strlen($word) <= $maxwordlen + 1) { > echo $word; > } > } > > ?> > > You can modify this to do whatever you like with the words... > > Is this like what you meant?

« previous php.general (#23133) next »