What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » Random Word [site]

Random Word [site]
Author: Message:
the DtTvB
Junior Member
**


Posts: 47
Reputation: 10
– / Male / –
Joined: Mar 2007
Status: Away
RE: Random Word [site]
Yeah, you just need a dictionary.

I recommend using english-words.50 file from scowl-6.

Now you have to create an array from a file and pick a word.

Example code:
code:
<?php

$wordlist = file('english-words.50');

function pick_a_word() {
    global $wordlist;
    return trim($wordlist[rand(0, count($wordlist) - 1)]);
}

for ($i = 0; $i < 20; $i ++)
    echo pick_a_word() . ' ';

?>

This post was edited on 03-26-2007 at 09:15 AM by the DtTvB.
the DtTvB - My name has no meaning, but it's unique at least!
[Image: asj.gif]
03-26-2007 09:09 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Random Word [site] - by Eddie on 03-26-2007 at 08:22 AM
RE: Random Word [site] - by the DtTvB on 03-26-2007 at 09:09 AM
RE: Random Word [site] - by Eddie on 03-26-2007 at 09:11 AM
RE: Random Word [site] - by the DtTvB on 03-26-2007 at 09:17 AM
RE: Random Word [site] - by Felu on 03-26-2007 at 09:18 AM
RE: Random Word [site] - by Eddie on 03-26-2007 at 10:00 AM
RE: Random Word [site] - by Volv on 03-26-2007 at 12:13 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On