Thread: Randomize code
View Single Post
Old 05-05-2008, 08:28 AM   #3 (permalink)
sjaq
The Acquainted
 
sjaq's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 113
Thanks: 11
sjaq is on a distinguished road
Default

Something like this?
PHP Code:
$str 'XXXX-XXX-XXX-XX-XXXX';
echo 
preg_replace_callback('/X/'create_function('$match''return chr(rand(65, 90));'), $str); 
sjaq is offline  
Reply With Quote
The Following 2 Users Say Thank You to sjaq For This Useful Post:
Tanax (05-05-2008), Yoosha (05-27-2008)