How to use str shuffle in PHP
In this article I will explain how the str shuffle() function can be used in PHP.
str_shuffle() function in PHP
The str_shuffle() function is used to randomly shuffles all the characters of a string.
Syntax
Parameter
- string string is required parameter. it is specify for shuffle to the string.
Example
The following example show to how the str_shuffle() function can be used in PHP.
<html>
<body>
<h3 style="color: darkblue;">str_shuffle() function example in PHP</h3>
<?php
$string='Welcome to C-sharpcorner.com';
$shuffled_string=str_shuffle($string);
echo $shuffled_string;
?>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here