title: How do I flatten an associative array into an array with only values in PHP?
body: <p>I have an array that has keys and values. For eg:</p>
  
  <pre><code>Array (
      [name] =&gt; aalaap
      [age] =&gt; 29
      [location] =&gt; mumbai
  )
  </code></pre>
  
  <p>I want to convert the keys from this into values, but I want the values to apear right after the keys. For eg:</p>
  
  <pre><code>Array (
      [0] =&gt; name
      [1] =&gt; aalaap
      [2] =&gt; age
      [3] =&gt; 29
      [4] =&gt; location
      [5] =&gt; mumbai
  )
  </code></pre>
  
  <p>I can easily write an iteration function that will do this... for eg:</p>
  
  <pre><code>array_flatten($arr) {
      foreach ($arr as $arrkey =&gt; $arrval) {
          $arr_new[] = $arrkey;
          $arr_new[] = $arrval;
      }
      return $arr_new;
  } 
  </code></pre>
  
  <p>...but I'm trying to find out if there's any way this can be accomplished using <code>array_combine</code>, <code>array_keys</code>, <code>array_values</code> and/or <code>array_merge</code>, preferably in one, so i don't need to use a custom function.</p>
  
  <p>Is there?</p>