×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: PHP
Posted by: Eray Demirel
Added: Nov 18, 2016 2:04 PM
Views: 13
Creates a random letters string in given length
  1. function random_letters($length) {
  2.   $random = '';
  3.   for ($i = 0; $i < $length; $i++) {
  4.     $random .= chr(rand(ord('a'), ord('z')));
  5.   }
  6.   return $random;
  7. }