title: PHP: Unintentional multidimensional array insted of onedimenisonal
body: <p>I'm searching 1 column in 1 table of my database for different entries by using this statement:</p>
  
  <pre><code>SELECT DISTINCT column FROM table WHERE column entry LIKE '%keyword%'
  </code></pre>
  
  <p>This works fine since dumping the mysqli_query shows me the expected amount of entries for the specific keyword provided.
  I then try to write the query result into a onedimensional array (the array is declared somewhere else in the code):</p>
  
  <pre><code>while($row = mysqli_fetch_row($query)) {
  $array[] = $row;
  }
  </code></pre>
  
  <p>As a result I'm expecting a simple numeric onedimensional array like this:</p>
  
  <pre><code>Array(
  [0] =&gt; value 1
  [1] =&gt; value 2
  ...
  )
  </code></pre>
  
  <p>When checking the result by using print_r($array) I get an array like this:</p>
  
  <pre><code>Array(
  [0] =&gt; Array([0] =&gt; value1)
  [1] =&gt; Array([0] =&gt; value2)
  ...
  )
  </code></pre>
  
  <p>I don't know where this weird structure comes from since this is not the only array in my code. I checked the particular code block step by step and came to the conclusion that the problem is within the creation of the array. Using mysqli_fetch_assoc didn't solve this issue. But what exactly is the problem here?</p>
  
  <p>Has anyone ever seen something like this and any idea how to solve this?</p>
  
  <p>Thanks in advance.</p>