The following code loads the contents of a text file and randomly displays a line from it. You can use this to display a random quote on a page every time it loads.
$file= "quotes.txt"; echo $quotes[$randomquote];
It works by loading a file into memory and picking a line from that file at random. Here is a sample file you might want to use.
This is the first quote - Person One This is the second quote - Person Two
Fill this with your own quotes and you are away.
Great content! Super high-quality! etutorialspoint
ReplyDelete