function scramble($string) { $count2++; while ( $count2 != strlen($string) ) { $bad=1; while ( $bad == 1 ) { $rand=rand(0, (strlen($string) - 1)); if ( $used[$rand] != 1 ) { $bad=0; $used[$rand]=1; } } $newstring.=substr($string, $rand, 1); $count2++; } return($newstring); }
-----Original Message----- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 11:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Does anybody have code for this? on 3/1/02 2:43 AM, Monty at [EMAIL PROTECTED] wrote: > Maybe try looking into the crypt() or md5() functions on php.net. These will > encrypt a string more than "scramble," but maybe one of these serves the > purpose. No, that isn't what I'm looking for. It's not for encryption. I just need a function that scrambles a string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php