title: I want to limit this foreach() loop in PHP to 2 outputs
body: <p>This is the loop I want to limit this to 2 outputs and create another loop for further outputs please help.. I am a beginner </p>
  
  <p>Enter code here</p>
  
  <pre><code>&lt;?php if ($informations) { ?&gt;
  &lt;div class="column"&gt;
      &lt;h3&gt;
          &lt;?php echo $text_information; ?&gt;
      &lt;/h3&gt;
      &lt;ul&gt;
          &lt;?php foreach ($informations as $information){ ?&gt;
          &lt;li&gt;&lt;a href="&lt;?php echo $information['href']; ?&gt;"&gt;
          &lt;?php echo $information['title']; ?&gt;
          &lt;/a&gt;&lt;/li&gt;
          &lt;?php } ?&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>