Menu Home

str_shuffle

osbo.com | PHP | Functions | str_shuffle

Randomly shuffles a string

Syntax

str_shuffle ( string $str ) : string

Parameters

str

The input string.

Return

Returns the shuffled string.

Examples

<?

$str = 'abcdef';

$return = str_shuffle($str);

echo $return;

?>
defcba

PHP