Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP str_shuffle() Function

PHP str_shuffle() Function

PHP String Reference Manual PHP String Reference Manual

Example

Randomly shuffle all characters in a string:

Run Example »


Definition and Usage

The str_shuffle() function randomly shuffles all characters in a string.


Syntax

str_shuffle(

string

)

Parameters Description
string Required. Specifies the string to shuffle.

Technical Details

Return Value: Returns the shuffled string.
PHP Version: 4.3.0+

PHP String Reference Manual PHP String Reference Manual