Reply to Re: Quote of the day...

Your name:

Reply:


Posted by Andy Hassall on 11/14/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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация