Random String Generator





5
Date Submitted Fri. Oct. 14th, 2005 4:49 PM
Revision 1 of 1
Helper lilleman
Tags PHP | Random | String
Comments 1 comments
Random String Generato
<?php

function getRandomString($chars, $length)
{
  for( $string = null; strlen($string) < $length;
    $string .= $chars{mt_rand(0,strlen($chars)-1)});
 
  return $string;
}

?>

Erik Riklund

phofer.com

Comments

Comments Good
Wed. Apr. 2nd, 2008 3:34 PM    Scripter sehrgut

Voting