| Posted by Andy Hassall on 06/16/20 11:24 
On 18 Aug 2005 14:54:10 -0700, google@sigol.co.uk wrote:
 >Hi I'm a newbie. I want to create a simple script that reads a text
 >file (quotes.txt) and picks a quote from the file at random. There will
 >be one quote per line in the file. Any help would be greatly
 >appreciated.
 
 A näive but simple and effective approach for smallish files could just use:
 
 http://uk2.php.net/file
 http://uk.php.net/array_rand
 
 --
 Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
 <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
  Navigation: [Reply to this message] |