$message doesn’t seem to be displaying anything.
I have the following code:
<?php
$files = glob("testimonials/*.txt");
$filename = $files[rand(0, count($files)-1)];
$lines = file($filename);
$author = array_shift($lines);
$message = explode("", $lines);
?>
<h1>Testimonial</h1>
<p><b>Author:</b> <?php echo $author; ?></p>
<?php echo $message; ?>
In my testimonials folder, I have text files with author name one the first line, then the message on the lines directly under that.
What am I missing here to make this work correctly?
Try This: