This script will mix up all characters in a string.
This could be used as a basic random password generator but you can't control the length unless you use another php function.
<?php
/*****************
--Shuffle String
--More PHP Scripts at
--http://icecaves.net/tags/php
*****************/
$text = "The characters in this string will be mixed in a random order.";
$output = str_shuffle($text);
echo "<b>String:</b> $text<br><b>Result:</b> $output";
?>Code Preview:
String: The characters in this string will be mixed in a random order.
Result: airlxa ohT nrmsorrmawieecibsl nc r h init idhd gtder e satn.e
Result: airlxa ohT nrmsorrmawieecibsl nc r h init idhd gtder e satn.e
Forum Board:
