PHP: Random Quote


PHP: Random Quote

Make a file called quotes.txt

Put each quote on it’s on line.

Here’s a script:

<?
$r_array=file(‘quotes.txt’);
shuffle($r_array);
echo $mQuotePath[0];
echo $r_array[0];
?>

Advertisements

thanks 4 u comments..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s