Posts: 1,832
Location: Somewhere else entirely
|
PHP Code:
<?php $randquotes_file = file("myquotes.txt"); $randquotes_file = array_merge($randquotes_file,file("myquotes2.txt")); $randquotes_file = array_merge($randquotes_file,file("morequotes.txt")); $randquotes_file = array_merge($randquotes_file,file("yetmorequotes.txt")); $randquotes = rand(0, sizeof($randquotes_file)-1); $Random_Quote = $randquotes_file[$randquotes]; echo $Random_Quote; ?>
That should allow you to source the quotes from multiple text files. If you want to display random images then you can either fill the text files with the image filenames and then echo out <img> tags around the filenames, or you can get rid of the text files and use the PHP directory functions to list the files in the image directory and pick one randomly to display.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';
Please login or register to view this content. Registration is FREE (aka MSN handwriting for forums)
|