title: shuffle / randomise array based on argument
body: <p>I am searching for some kind of function or technique how to randomize/shuffle array based on parameter. 
  I will try to describe what I am looking for.</p>
  
  <p>Let's say we have:</p>
  
  <pre><code>$begin_array = array( 1,2,3,4,5,6,7,8,9,0 );
  </code></pre>
  
  <p>Then we call function:</p>
  
  <pre><code>magic_function( $begin_array, 1 );
  </code></pre>
  
  <p>And it returns the same randomized array every time based on second int argument of the function (1).
  If we provide 2, the returned array should be different from the first one but always in the same randomized order.</p>
  
  <p>In other words this "magic" function should return randomized array based on the second integer argument.</p>
  
  <p>The length of $begin_array is always different.</p>
  
  <p>And the second argument can be up to 256.</p>
  
  <p>Sample of what I am expecting:</p>
  
  <pre><code>&lt;?php
  
  $begin_array = array( 1,2,3,4,5,6,7,8,9,0 );
  
  magic_function( $begin_array, 1 );
  // always returns the same randomized array based on second int argument 1
  // for ex: array( 5,2,1,8,3,9,6,4,7,0 );
  
  magic_function( $begin_array, 2 );
  // always returns the same randomized array based on second int argument 2
  // for ex: array( 0,3,4,8,9,1,2,6,7,5 );
  
  ?&gt;
  </code></pre>
  
  <p>I hope you understood me ;)</p>
  
  <p>Thank you in advance, friends!</p>