Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 8th, 2013  |  syntax: PHP  |  size: 0.29 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $articles = $page->children()->visible()->flip();
  3. $count = $articles->count();
  4. foreach($articles as $article){
  5.         echo "<article><span=\"numeral\">{$count--}</span>";
  6.         echo "<h1><a href=\"" . html($article->url()) ."\">". html($article->title()) ."</a></h1>";
  7.         echo "</article>";
  8. }
  9. ?>