$upperLimit) $error_msg[] = "Lower Limit must be less than or equal to Upper Limit.";
}
if($error_msg > 0) {
echo "Your form has the following error(s)
";
echo "\n";
foreach($error_msg as $err) {
echo "- ".$err."
\n";
}
echo "
\n";
echo "
";
}
function add($x,$y) {
while($x <= $y) {
$list[] = $x;
$x++;
}
return $list;
}
function ascending($list) {
$list = array_values($list);
sort($list);
return $list;
}
function descending($list) {
$list = array_values($list);
rsort($list);
return $list;
}
function random($list) {
$list = array_values($list);
shuffle($list);
return $list;
}
function multi($list) {
$list = array_values($list);
for ($i = 0; $i < count($list); ++$i) {
$list[$i] *= 10;
}
return $list;
}
if($mult == yes) {
if($direction == 0) $list = ascending(multi($list));
elseif($direction == 1) $list = descending(multi($list));
elseif($direction == 2) $list = random(multi($list));
}
else {
if($direction == 0) $list = ascending($list);
elseif($direction == 1) $list = descending($list);
elseif($direction == 2) $list = random($list);
}
echo implode(",",$list);
?>