Advertisement
Guest User

Untitled

a guest
Jan 18th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement