PHP - Random Quote Script Generator

Selects a quote at random. Enter your quotes below.

Thats all folks!
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 I fish better with a lit cigar, some people fish better with talent. ~Nick Lyons
Riverdrift.comroadrun
1999 - 2024    Made in the U.S.A