View Single Post
Old 06-08-2005, 06:35 PM  
Donners
Confirmed User
 
Join Date: Jun 2004
Posts: 689
php help needed!

I have this simple php script..

Code:
<?
   $quoteFile = "quotes.txt";  //File holding qoutes

   $fp = fopen($quoteFile, "r");   //Opens file for read
   $content = fread($fp, filesize($quoteFile));
   $quotes = explode("\n",$content);   //Put quotes into array
   fclose($fp);   //Close the file

   srand((double)microtime()*1000000);  // randomize
   $index = (rand(1, sizeof($quotes)) - 1); //Pick random qoute

   echo $quotes[$index]; //Print quote to screen

?>
But it only displays ONE qoute, I want it to display any number of qoutes of my choice. How can I do this?
Donners is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote