PHP str_shuffle Function

What is str_shuffle Function?

Explanation

In PHP, this function randomly shuffles a string.

Syntax:


str_shuffle(string)

In the above syntax, the "string" given is shuffled.

Example :


<?php
echo str_shuffle("Hi How Are You");
?>
Result :

Yi or HAow ueH

In the above example a string is shuffled randomly and displayed.

PHP Topics


Ask Questions

Ask Question