Entry
Is it possible to specify which items can be a special item or is it random?
Aug 10th, 2000 06:16
C Walker, Leon, mailing list
function SpecialItem()
{
global $DatabaseLink;
//how often to change item
$ChangeDays =7;
//create array of item IDs
$Item_ID = array(1,2,3);
//get day of the year (1-365)
$DayOfYear = date("z");
//return item ID
return($Item_ID[(floor($DayOfYear/$ChangeDays)%(count
($Item_ID)))]);
}
See the line that's commented "create array of item IDs"? Put the IDs
of your special items in there instead of just 1,2,3.