title: foreach loop how to expect first result?
body: <p>Using codeigniter framework i have this code here</p>
  
  <pre><code>&lt;?php 
  
  foreach ($allposts as $posts) { 
  echo '&lt;div class="col-sm-1"&gt;
      &lt;div class="thumbnail"&gt;
      &lt;img class="img-responsive user-photo" src="https://ssl.gstatic.com/accounts/ui/avatar_2x.png"&gt;
      &lt;/div&gt;&lt;!-- /thumbnail --&gt;
      &lt;/div&gt;&lt;!-- /col-sm-1 --&gt;
  
      &lt;div class="col-sm-11"&gt;
      &lt;div class="panel panel-default companel"&gt;
      &lt;div class="panel-heading companel-heading"&gt;
      &lt;strong&gt;&lt;a href="'.base_url('home/user/'.$posts-&gt;author_name).'"&gt;'.$posts-&gt;author_name.'&lt;/a&gt;&lt;/strong&gt; &lt;span class="text-muted"&gt;'.unix_to_human($posts-&gt;post_date).'&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="panel-body"&gt;
      '.$posts-&gt;post.'
      &lt;/div&gt;&lt;!-- /panel-body --&gt;
      &lt;/div&gt;&lt;!-- /panel panel-default --&gt;
      &lt;/div&gt;&lt;!-- /col-sm-11 --&gt;'; 
  } 
  ?&gt;
  </code></pre>
  
  <p>now i want to except first result or first post in my case ? it is possible </p>
  
  <p>and another question may i do something like display posts but one by one i mean align one right and second one left?</p>