title: PHP How to split multi dimensional array into single array?
body: <p>Simple code that i use to get array results:</p>
  
  <pre><code>require_once 'connect_to_mysql.php';
  $sql = "SELECT * FROM protect";
  $result = mysqli_query($conn, $sql);
  $db_array = array();
      if (mysqli_num_rows($result) &gt; 0){
          while ($row = mysqli_fetch_assoc($result)){
              $db_array[] = $row;
          }
      }
      echo '&lt;pre&gt;';
      print_r($db_array);
      echo '&lt;/pre&gt;';
  </code></pre>
  
  <p>I get the following array from database:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [id] =&gt; 1
              [words] =&gt; cat
              [keyword] =&gt; nice cat
          )
  
      [1] =&gt; Array
          (
              [id] =&gt; 2
              [words] =&gt; good dog
              [keyword] =&gt; dog training
          )
  
      [2] =&gt; Array
          (
              [id] =&gt; 3
              [words] =&gt; love birds
              [keyword] =&gt; birds
          )
  
  )
  </code></pre>
  
  <p>i wish to get this all data in a single array like this:</p>
  
  <pre><code>Array
  (
      [0] =&gt; cat
      [1] =&gt; good dog
      [2] =&gt; love birds
  ) 
  </code></pre>
  
  <p>Could you please tell how i can do so?
  Thank you.</p>