05-05-2008, 08:52 AM
|
#6 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Location: Netherlands
Posts: 113
Thanks: 11
|
With numbers
PHP Code:
<?php
$str = 'XXXX-XXX-XXX-XX-XXXX'; echo preg_replace_callback('/X/', create_function('$match', 'return rand(0, 1)? chr(rand(65, 90)) : chr(rand(48, 57));'), $str);
?>
@Orc: your code will generate the same string every time so it isn't that random
|
|
|
|