R
iver
D
rift
Html
Graphics
Games
Photos
Videos
PHP - Random Quote Script Generator
Selects a quote at random. Enter your quotes below.
Thats all folks!
Reset
Copy to the <body> of your document.
copy to clipboard
<?php
#construct the quote array
$quotes=array(
"{{url1}}"
,"{{url2}}"
,"{{url3}}"
,"{{url4}}"
,"{{url5}}"
,"{{url6}}"
,"{{url7}}"
,"{{url8}}"
,"{{url9}}"
,"{{url10}}"
,"{{url11}}"
,"{{url12}}"
,"{{url13}}"
,"{{url14}}"
,"{{url15}}"
);
#constuct the random file selector
$n=count($quotes);
$num=rand(0, ($n-1));
$quote=$quotes[$num];
$text=$quote;
#send the quote to the browser
print "$text";
?>
Refresh a few times for demo
Give a man a fish and he has food for a day, teach him how to fish and you can get rid of him for the entire weekend. ~Zenna Schaffer
Riverdrift.com
2003 - 2025 Hand Made in the U.S.A