note 35821 deleted from function.str-shuffle by aidan
| From: | aidan@php.net | Date: | Fri, 05 Aug 2005 11:25:48 +0000 |
| Subject: | note 35821 deleted from function.str-shuffle by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93123@lists.php.net to get a copy of this message | ||
Note Submitter: floweb at yahoo dot com
----
this is basically the equivelent to the str_shuffle they use
function str_shuffle($word){
for($i=0;$i<strlen($word);$i++)
$array[]=$word[$i];
shuffle($array);
for($i=0;$i<count($array);$i++)
$newstring .= $array[$i];
return $newstring;
}
sidenote: wrote this when me and a friend were writing some code and i realized i was using 4.3.0
and he was using 4.2.0 needless to say my code took less lines :)