title: php - Foreach - Wrapping <li> </li> with two results inside, then repeating.
body: <p>Working with php - 
  Im trying to run a "foreach" on an array, but i want to wrap every two results in li tags. Output will look like this.</p>
  
  <p><code>&lt;li&gt;</code></p>
  
  <p><code>&lt;div&gt;result 1&lt;/div&gt;</code></p>
  
  <p><code>&lt;div&gt;result 2&lt;/div&gt;</code></p>
  
  <p><code>&lt;/li&gt;</code></p>
  
  <p><code>&lt;li&gt;</code></p>
  
  <p><code>&lt;div&gt;result 3&lt;/div&gt;</code></p>
  
  <p><code>&lt;div&gt;result 4&lt;/div&gt;</code></p>
  
  <p><code>&lt;/li&gt;</code></p>
  
  <p><code>&lt;li&gt;</code></p>
  
  <p><code>&lt;div&gt;result 5&lt;/div&gt;</code></p>
  
  <p><code>&lt;div&gt;result 6&lt;/div&gt;</code></p>
  
  <p><code>&lt;/li&gt;</code></p>
  
  <p>how do i go about doing this?</p>
  
  <p>Thanks!</p>