Latest web development tutorials

PHP str_shuffle () function

PHP String Reference PHP String Reference

Examples

Randomly disrupt all the characters in a string:

<?php
echo str_shuffle("Hello World");
?>

Running instance »

Definition and Usage

str_shuffle () function randomly disrupt all the characters in a string.


grammar

str_shuffle( string )

参数 描述
string 必需。规定要打乱的字符串。

technical details

return value: Returns a string of upset.
PHP version: 4.3.0+


PHP String Reference PHP String Reference