This is part of my code:
print "<ul>";
for ($a=0; $a <= 500; $a += 1 ) {
print "<li>";
print $input[array_rand($input)];
print $input[array_rand($input)];
print $input[array_rand($input)];
if ( $ch >= 4 ){
print $input[array_rand($input)];
}if ( $ch >= 5 ){
print $input[array_rand($input)];
}if ( $ch >= 6 ){
print $input[array_rand($input)];
}if ( $ch >= 7 ){
print $input[array_rand($input)];
}
print "</li>";
}
print "</ul>";
The thing is that I want it to output the values of the variable input but I don't want it to repeat the same value unless there are 2 values that are equal. How can I d0 this?
print "<ul>";
for ($a=0; $a <= 500; $a += 1 ) {
print "<li>";
print $input[array_rand($input)];
print $input[array_rand($input)];
print $input[array_rand($input)];
if ( $ch >= 4 ){
print $input[array_rand($input)];
}if ( $ch >= 5 ){
print $input[array_rand($input)];
}if ( $ch >= 6 ){
print $input[array_rand($input)];
}if ( $ch >= 7 ){
print $input[array_rand($input)];
}
print "</li>";
}
print "</ul>";
The thing is that I want it to output the values of the variable input but I don't want it to repeat the same value unless there are 2 values that are equal. How can I d0 this?