Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $articles_categories_body = R::getAll('SELECT * FROM articles_categories'); ?>
- <?php foreach( $articles_categories_body as $key => $articles_categories_body_item ): ?>
- <div class="container">
- <?php if ($key % 2 == 1): ?>
- <div class="row left">
- <?php
- if ($articles_categories_body_item['id'] % 2 == 0)
- {
- echo $articles_categories_body_item['title'];
- }
- ?>
- </div>
- <?php else: ?>
- <div class="row right">
- <?php
- if ($articles_categories_body_item['id'] % 2 != 0)
- {
- echo $articles_categories_body_item['title'];
- }
- ?>
- </div>
- <?php endif; ?>
- </div>
- <?php endforeach; ?>
Add Comment
Please, Sign In to add comment