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 18th, 2013  |  syntax: PHP  |  size: 0.33 KB  |  views: 34  |  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.         $item_amount = 20;
  3.         $item_count = $feed->get_item_quantity();
  4.         $item_list = array();
  5.  
  6.         for ($i=0;$i<$item_amount;$i++) {
  7.                 $random_item = $feed->get_items(rand(0,$item_count));
  8.                 if (!in_array($random_item, $item_list)) {
  9.                         $item_list[] = $random_item;
  10.                         echo $random_item . "</br>";
  11.                 } else {
  12.                 $i--;
  13.                 }
  14.         }
  15. ?>