PHP str_shuffle() function || str_shuffle() function in PHP
×


str_shuffle() function in php

1784

str_shuffle() function is used to shuffles all the characters of a string randomly. It is an inbuilt function of PHP.

Syntax:

str_shuffle($string);

here,

$string is a PHP String.


Example:

<?php
$str="Welcome to Coding Tag";
$new_str=str_shuffle($str);
echo "Old string is : <strong>$str</strong><br>";
echo "Shuffled string is : <strong>$new_str</strong>";
?>

Output:

Shuffle() function in PHP



Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments