SHARE
TWEET

Untitled

a guest Mar 12th, 2018 23 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $articles_categories_body = R::getAll('SELECT * FROM articles_categories'); ?>
  2.  
  3. <?php foreach( $articles_categories_body as $key => $articles_categories_body_item ): ?>
  4. <div class="container">
  5.   <?php if ($key % 2 == 1): ?>
  6.   <div class="row left">
  7.     <?php
  8.       if ($articles_categories_body_item['id'] % 2 == 0)
  9.         {
  10.           echo $articles_categories_body_item['title'];
  11.         }
  12.     ?>
  13.   </div>
  14.   <?php else: ?>
  15.   <div class="row right">
  16.     <?php
  17.       if ($articles_categories_body_item['id'] % 2 != 0)
  18.         {
  19.           echo $articles_categories_body_item['title'];
  20.         }
  21.     ?>
  22.   </div>
  23. <?php endif; ?>
  24. </div>
  25. <?php endforeach; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top