title: How to add or remove (if already exists) a key=>value pair to an array?
body: <p>I would like to do this with a single function.</p>
  
  <p>I have a key=>value pair:</p>
  
  <pre><code>14=&gt;1
  </code></pre>
  
  <p>I have an array containing many such pairs:</p>
  
  <pre><code>array(15=&gt;2, 16=&gt;7, 4=&gt;9)
  </code></pre>
  
  <p>I want a function which will add the key=>value pair to the array in case it is not already there but it will remove it from the array if it is already there.</p>
  
  <p>I would like to have a single function for this.</p>