Random letters

Started on the old forum in August 2009 · view the original in the archive · old links redirect here

4 replies · 468 views · started 17 years ago · 1 min read

3 participants
shad0w Developer · 119 posts #1

Hi coders. I need a function that generates ramdom word from another word

Ex:

$word = "abcd"; $word2 = randword($word)

returns: $word2 = acdb OR bdac OR cadb etc...

Please help.

Thanks.

whatmp3.name - search mp3 on mobile

shad0w Developer · 119 posts #2

youngson2 wrote:

function genRandomString() {
    $length = 10;
    $characters = ‘0123456789abcdefghijklmnopqrstuvwxyz’;
    $string = ”;    
    for ($p = 0; $p < $length; $p++) {
        $string .= $characters[mt_rand(0, strlen($characters))];
    }
    return $string;
}

This is something i got in 2 seconds from google: PHP random string.

Just Fucking Google It

That returns a random word that has 10 letters... I don't need that...

whatmp3.name - search mp3 on mobile

subzero Super moderator Fellow · 3,954 posts #3
function genRandomString() {
    $length = 10;
    $characters = ‘0123456789abcdefghijklmnopqrstuvwxyz’;
    $string = ”;    
    for ($p = 0; $p < $length; $p++) {
        $string .= $characters[mt_rand(0, strlen($characters))];
    }
    return $string;
}

$length = 10;

You can change it geez are you not lookin at this ?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

CreativityKills Lead · 833 posts #4

He wants the word scramble snippet nt wot u supplied subzero. He wants "abcd" to be scattered, and still NOT REPEAT ANY OF the string alphabets. Ryt shadow?

I think theres a functinn for that shadow.

$str = str_shuffle("abcd");
//if the above dnt work try the next below nt sure which
$str = strshuffle("abcd");
shad0w Developer · 119 posts #5

mobileGIGS wrote: He wants the word scramble snippet nt wot u supplied subzero. He wants "abcd" to be scattered, and still NOT REPEAT ANY OF the string alphabets. Ryt shadow?

I think theres a functinn for that shadow.

$str = str_shuffle("abcd");
//if the above dnt work try the next below nt sure which
$str = strshuffle("abcd");

Thx man ... It will help me a lot ...

whatmp3.name - search mp3 on mobile

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close