Random letters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random letters

    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

    #2
    Originally posted by youngson2
    Code:
    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 ****ing Google It
    That returns a random word that has 10 letters... I don't need that...
    whatmp3.name - search mp3 on mobile

    Comment


      #3
      PHP Code:
      function genRandomString() {
          
      $length 10;
          
      $characters = &#8216;0123456789abcdefghijklmnopqrstuvwxyz’;
          
      $string = &#8221;;    
          
      for ($p 0$p $length$p++) {
              
      $string .= $characters[mt_rand(0strlen($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...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #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.
        Code:
        $str = str_shuffle("abcd");
        //if the above dnt work try the next below nt sure which
        $str = strshuffle("abcd");

        Comment


          #5
          Originally posted by mobileGIGS View Post
          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.
          Code:
          $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

          Comment

          Working...
          X