Return to Snippet

Revision: 32744
at November 6, 2012 08:58 by jprochazka


Updated Code
<?php
function randomString(){
  $string = "abcdefghijklmnopqrstuvwxyz0123456789";
  for($i=0;$i<25;$i++){
    $pos = rand(0,36);
    $str .= $string[$pos];
  }
  return $str
}
?>

Revision: 32743
at October 2, 2010 01:33 by jprochazka


Updated Code
<?php

function get_random_string(){
  $string = "abcdefghijklmnopqrstuvwxyz0123456789";
  for($i=0;$i<25;$i++){
    $pos = rand(0,36);
    $str .= $string[$pos];
  }
  return $str
}

?>

Revision: 32742
at October 2, 2010 01:32 by jprochazka


Initial Code
<?php

function get_random_string(){
  $string = "abcdefghijklmnopqrstuvwxyz0123456789";
  for($i=0;$i<25;$i++){
    $pos = rand(0,36);
    $str .= $string[$pos];
  }
  return $str
}

?>

Initial URL


Initial Description
This function returns a random string composed of the characters contained within the "$string" variable of the function.

Initial Title
Generate a random string.

Initial Tags


Initial Language
PHP