Guest User

Untitled

a guest
Mar 12th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  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; ?>
Add Comment
Please, Sign In to add comment