arrays - How do I randomly jumble a string imploded by ',' in PHP (ex: a,b,c = c,b,a) in a oneliner? -


how randomly jumble string imploded ',' in php (ex: a,b,c = c,b,a) in one-liner?

here example

srand((double)microtime*1000000); $foo=array(   => "a",   b => "b",   c => "c"); echo "the jumbled comma separated values are: ".randomlyjumble(.implode(",",$foo))."<br />"; 

use shuffle before imploding. keep in mind shuffle takes parameter reference inline modification, need on separate line.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -