I have a set of 4 HTML list items and I'd like to shuffle the order they appear in once a week. I have found the following which could be used - but at the moment, it only returns one list item - how could I modify it to show the four required?
Any ideas would be gratefully received :)
function RandomList($TimeBase, $QuotesArray){
$TimeBase = intval($TimeBase);
$ItemCount = count($QuotesArray);
$RandomIndexPos = ($TimeBase % $ItemCount);
return $QuotesArray[$RandomIndexPos];
}
$WeekOfTheYear = date('W');
$RandomItems = array(
"<li><a href=\"#northern-germany\" title=\"Northern Germany\">North</a></li>","<li><a href=\"#southern-germany\" title=\"Southern Germany\">South</a></li>","<li><a href=\"#western-germany\" title=\"Western Germany\">West</a></li>","<li><a href=\"#eastern-germany\" title=\"Eastern Germany\">East</a></li>");
print RandomList($WeekOfTheYear, $RandomItems);