title: Using php array_chunk with mysqli_fetch_array
body: <p>I need to break up an array into chunks, but it's the result of a mysql query that contains multiple values. It looks like this:</p>
  
  <pre><code>$minQuery = "SELECT typeName, typeID FROM  invTypes WHERE groupID = '18'";
  
  $con = mysqli_connect('127.0.0.1', $username, $password, 'sdeodyssey107');
  $result = mysqli_query($con,$minQuery);
  </code></pre>
  
  <p>What I need to do is to be able to break this result up into rows of 3 at a time. I can't seem to find a way to get array_chunk to work with the multiple values, and everything I have tried with while loops ends up with me repeating the same value multiple times per row.</p>
  
  <p>Anyone know a good way to handle this? The line that will be printed looks like this:</p>
  
  <pre><code>echo '&lt;td align="right"&gt;' . $typeName . ': &lt;input type="text" size="25" name="' . $typeName . '|' . $itemID . '"';if(isset($_GET["$cleanTypeName|$itemID"])) echo 'value="'.$_GET["$cleanTypeName|$itemID"].'"';echo '&gt;&lt;/td&gt;';
  </code></pre>
  
  <p>...so I need to have both values available each time I call the function that prints those lines....</p>