当前位置: 首页> 函数类别大全> str_shuffle

str_shuffle

随机打乱一个字符串
名称:str_shuffle
分类:字符串
所属语言:php
一句话介绍:随机地打乱字符串中的所有字符。

实例

随机地打乱字符串中的所有字符:

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">str_shuffle</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"I love Shanghai"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

亲自试一试

同类函数
  • 计算子字符串出现次数 substr_count

    substr_count

    计算子字符串出现次数
  • 将字符串转化为小写 strtolower

    strtolower

    将字符串转化为小写
  • 使用“自然顺序”算法比较字符串(不区分大小写) strnatcasecmp

    strnatcasecmp

    使用“自然顺序”算法比较字符串(不区分大
  • 计算指定字符串在目标字符串中最后一次出现的位置(不区分大小写) strripos

    strripos

    计算指定字符串在目标字符串中最后一次出现
  • 查找字符串的首次出现 strstr

    strstr

    查找字符串的首次出现
  • 输出格式化的字符串 vprintf

    vprintf

    输出格式化的字符串
  • 将特殊字符转换为HTML实体 htmlspecialchars

    htmlspecialchars

    将特殊字符转换为HTML实体
  • 在字符串所有新行之前插入 HTML 换行标记 nl2br

    nl2br

    在字符串所有新行之前插入HTML换行标记