title: Convert an associative array to a simple array of its values in php
body: <p>I would like to convert the array:</p>
  
  <pre><code>Array ( 
  [category] =&gt; category 
  [post_tag] =&gt; post_tag 
  [nav_menu] =&gt; nav_menu 
  [link_category] =&gt; link_category 
  [post_format] =&gt; post_format 
  )
  </code></pre>
  
  <p>to </p>
  
  <pre><code>array(category, post_tag, nav_menu, link_category, post_format)
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>$myarray = 'array('. implode(', ',get_taxonomies('','names')) .')';
  </code></pre>
  
  <p>which echos out:</p>
  
  <pre><code>array(category, post_tag, nav_menu, link_category, post_format)
  </code></pre>
  
  <p>So I can do </p>
  
  <pre><code>echo $myarray;
  echo 'array(category, post_tag, nav_menu, link_category, post_format)';
  </code></pre>
  
  <p>and it prints the exact same thing.</p>
  
  <p>...but I can't use <code>$myarray</code> in a function in place of the manually entered array because the function doesn't see it as array or something.</p>
  
  <p>What am I missing here?</p>