I can tell you how to do it in javascript - very easy.
Start by declaring an array; each quote will be one element in the array. So you have:
var quotes = new Array(11);
quote[0] = "You are what you eat";
quote[1] = "Government is a lousy master and a treacherous servant";
quote[2] = "For the first time in history, it is possible to meet the needs for 100% of the global population";
etc.
So if you have 11 quotes your last one will be quote[10];
Then, to choose a random number of the array make a random number generator:
var choice = Math.floor(Math.random()*11);
Math.floor is to get an integer number. ^That 11 is because I assume 11 quotes; adjust it to your number. (Math.random() gives you a random decimal between 0 and 1)
Then just write it.
document.write(quotes[choice]);
Write that in text editor and save as something like quote_gen.js
Then upload the file onto your sever. Where you want it to appear, insert the script:
<script src="quote_gen.js" type="text/javascript"></script>
|