Str_shuffle () shuffles a string randomly.

string str_shuffle ( string $str )
Copy the code

Parameters to describe

str

Input a string.

The return value:

Returns a scrambled string.

Example:

<? php $str = 'abcdef'; $shuffled = str_shuffle($str); // Output is similar to: bfdaec echo $shuffled; ? >Copy the code