title: Switch two items in associative array
body: <p>Example:</p>
  
  <pre><code>$arr = array(
    'apple'      =&gt; 'sweet',
    'grapefruit' =&gt; 'bitter',
    'pear'       =&gt; 'tasty',
    'banana'     =&gt; 'yellow'
  );
  </code></pre>
  
  <p>I want to switch the positions of grapefruit and pear, so the array will become</p>
  
  <pre><code>$arr = array(
    'apple'      =&gt; 'sweet',
    'pear'       =&gt; 'tasty',
    'grapefruit' =&gt; 'bitter',
    'banana'     =&gt; 'yellow'
  )
  </code></pre>
  
  <p>I know the keys and values of the elements I want to switch, is there an easy way to do this?  Or will it require a loop + creating a new array?</p>
  
  <p>Thanks</p>