title: How to combine the keys and values of an array in PHP
body: <p>Say I have an array of key/value pairs in PHP:</p>
  
  <pre><code>array( 'foo' =&gt; 'bar', 'baz' =&gt; 'qux' );
  </code></pre>
  
  <p>What's the simplest way to transform this to an array that looks like the following?</p>
  
  <pre><code>array( 'foo=bar', 'baz=qux' );
  </code></pre>
  
  <p>i.e.</p>
  
  <pre><code>array( 0 =&gt; 'foo=bar', 1 =&gt; 'baz=qux');
  </code></pre>
  
  <p>In perl, I'd do something like</p>
  
  <pre><code>map { "$_=$hash{$_}" } keys %hash
  </code></pre>
  
  <p>Is there something like this in the <a href="http://us3.php.net/manual/en/ref.array.php" rel="noreferrer">panoply of array functions</a> in PHP? Nothing I looked at seemed like a convenient solution.</p>