title: Convert associative array of strings to flat array of integer (values only)
body: <p>I cant figure out how to get Array 1 and make it look like Array 2 so that I can send it as parameters for my prepared statements method. </p>
  
  <p>ARRAY 1: (what I currently have)</p>
  
  <pre><code>array(5) { [0]=&gt; array(2) { ["id"]=&gt; string(1) "1" [0]=&gt; string(1) "1" } [1]=&gt; array(2) { ["id"]=&gt; string(3) "314" [0]=&gt; string(3) "314" } [2]=&gt; array(2) { ["id"]=&gt; string(3) "315" [0]=&gt; string(3) "315" } [3]=&gt; array(2) { ["id"]=&gt; string(3) "316" [0]=&gt; string(3) "316" } [4]=&gt; array(2) { ["id"]=&gt; string(3) "317" [0]=&gt; string(3) "317" } } 
  </code></pre>
  
  <p>ARRAY 2: What I'm trying to get it to be. (please ignore that 1 item is missing)</p>
  
  <pre><code>array(4) { [0]=&gt; int(314) [1]=&gt; int(315) [2]=&gt; int(316) [3]=&gt; int(317) }
  </code></pre>
  
  <p>I'm trying to accomplish this in PHP php7.1 if that matters. </p>
  
  <p>I THINK this is enough information but if its not please let me know. I just didnt want to bog you down with all sorts of code and explanation that I'm not sure you need. </p>
  
  <p>What I've tried so far (although possibly not properly):</p>
  
  <pre><code>$category_ids2 = array_values($category_ids);
  </code></pre>