Yours Is actually a lot better, the one i did, can be broken quite quickly with large length requests, as it translates to a string of " $rand($2,$3) $+ " repeating $1 times and ends up blowing the line length, but i thought it looked quite clever, when i saw it in someone elses random string generator, so i thought id post here.