I have a slight problem with my code. What it is supposed to do is randomize the products to be displayed (see http://wilsonelectronics.com/Misc.php?Page=WhatsNew to see what I’m talking about) and only display a set amount at a time.
From my limited understanding of the php coding, this is the section that tells it what is to be placed on the page, how many it is supposed to display and that it is supposed to randomize which ones to display.
[code]case ‘WhatsNew’:
$New[] = NewProduct(812201, ‘Now Available’);
$New[] = NewProduct(801245, ‘Now Available’);
$New[] = NewProduct(301124, ‘Now Available’);
$New[] = NewProduct(301133, ‘Now Available’);
$New[] = NewProduct(301129, ‘Now Available’);
$New[] = NewProduct(301130, ‘Now Available’);
$New[] = NewProduct(301123, ‘Now Available’);
$New[] = NewProduct(801306, ‘Now Available’);
$New[] = NewProduct(811210, ‘Now Available’);
$New[] = NewProduct(811211, ‘Now Available’);
$New[] = NewProduct(801247, ‘Summer 2007’);
//Randomly Remove 3
$Rand = rand(0, (sizeof($New) - 3));
unset($New[$Rand]);
$Tpl->MergeBlock('New', $New) ;
break;[/code]
So far, all it does is display 10 of the 11 products and doesn’t randomize them. How can I make this work?