title: Remove random items from PHP array
body: <p>I need to reduce the size of this array to X, so i would like to remove X random items. Here's my PHP array:</p>
  
  <pre><code>Array
  (
      [helping] =&gt; 3
      [me] =&gt; 2
      [stay] =&gt; 1
      [organized!] =&gt; 1
      [votre] =&gt; 4
      [passion,] =&gt; 1
      [action,] =&gt; 1
      [et] =&gt; 2
      [impact!] =&gt; 1
      [being] =&gt; 4
  
  
  
  )
  </code></pre>
  
  <p>I tried array_rand() but it didn't keep the keys/values. </p>