Generate random comments
<?php
// comments array
$com[1]="comment 1";
$com[2]="comment 2";
$com[3]="comment 3";
$com[4]="comment 4";
$com[5]="comment 5";
$com[6]="comment 6";
$com[7]="comment 7";
$com[8]="comment 8";
$com[9]="comment 9";
$com[10]="comment 10";
// pull 3 comments (change the 3 to the number of comments you want to display)
for ($a=0; $a<3; $a++) {
// pick a random number between 1 and 10 (change the 10 if you have more or less comments)
$pull = rand(1,10);
// get the one that matches the random number from the list
$comment = $com[$pull];
// display it
echo "$comment<br />";
}
?>
dont forget to save the page with a .php extension to make it go
Have fun
~ Fe Pixie ~