PHP - 字串隨機排序函式



語法

string str_shuffle ( string $str )

定義和用法

用於隨機打亂字串。

返回值

返回打亂後的字串。

引數

序號 引數及說明
1

字串

包含輸入字串的資訊。

示例

嘗試以下示例

<?php
   $input = 'abcdefphp_function_str_shuffle';
   $shuffled = str_shuffle($input);
   
   echo $shuffled;
?>
felsdirnf_ecu_fhpnt_uafosbpcht
php_function_reference.htm
廣告