downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<str_rot13str_split>
Last updated: Thu, 26 Jun 2008

str_shuffle

(PHP 4 >= 4.3.0, PHP 5)

str_shuffle — Randomly shuffles a string

Description

string str_shuffle ( string $str )

str_shuffle() shuffles a string. One permutation of all possible is created.

Parameters

str

The input string.

Return Values

Returns the shuffled string.

Examples

Example #1 str_shuffle() example

<?php
$str
= 'abcdef';
$shuffled = str_shuffle($str);

// This will echo something like: bfdaec
echo $shuffled;
?>

See Also



add a noteadd a note User Contributed Notes
Randomly shuffles a string
There are no user contributed notes for this page.




<str_rot13str_split>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs