How can a PHP script be modified to display random comments on a webpage?
To display random comments on a webpage using a PHP script, you can store the comments in an array and then use the `array_rand()` function to select a random comment to display each time the page is loaded.
<?php
// Array of random comments
$comments = array(
"Great job on the website!",
"I love the content on this page.",
"Keep up the good work!",
"This is an awesome website."
);
// Select a random comment from the array
$random_comment = $comments[array_rand($comments)];
// Display the random comment on the webpage
echo $random_comment;
?>