Re: [PHP] multiple random items

2007-07-17 Thread Richard Lynch
On Mon, July 16, 2007 9:40 am, [EMAIL PROTECTED] wrote: > Hi I have this script which pulls 1 random item from a txt file. > How would I modify it to pull 10 random items. To forestall a rather lengthy discussion on what you mean by 10 random items, I'm actually not going to answer that question.

RE: [PHP] multiple random items

2007-07-16 Thread Edward Kay
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 16 July 2007 15:40 > To: php-general@lists.php.net > Subject: [PHP] multiple random items > > > Hi I have this script which pulls 1 random item from a txt file. > How would I

Re: [PHP] multiple random items

2007-07-16 Thread Zoltán Németh
2007. 07. 16, hétfő keltezéssel 10.56-kor Robert Cummings ezt írta: > On Mon, 2007-07-16 at 16:49 +0200, Zoltán Németh wrote: > > 2007. 07. 16, hétfő keltezéssel 15.40-kor [EMAIL PROTECTED] ezt írta: > > > Hi I have this script which pulls 1 random item from a txt file. > > > How would I modify it

Re: [PHP] multiple random items

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 16:49 +0200, Zoltán Németh wrote: > 2007. 07. 16, hétfő keltezéssel 15.40-kor [EMAIL PROTECTED] ezt írta: > > Hi I have this script which pulls 1 random item from a txt file. > > How would I modify it to pull 10 random items. > > > > > $delim = "\n"; > > $quotefile = "names

Re: [PHP] multiple random items

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 16:49 +0200, Zoltán Németh wrote: > 2007. 07. 16, hétfő keltezéssel 15.40-kor [EMAIL PROTECTED] ezt írta: > > Hi I have this script which pulls 1 random item from a txt file. > > How would I modify it to pull 10 random items. > > > > > $delim = "\n"; > > $quotefile = "names

Re: [PHP] multiple random items

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 15:40 +0100, [EMAIL PROTECTED] wrote: > Hi I have this script which pulls 1 random item from a txt file. > How would I modify it to pull 10 random items. > > $delim = "\n"; > $quotefile = "names.txt"; > $fp = fopen($quotefile, "r"); > $contents = fread($fp, filesize($quot

Re: [PHP] multiple random items

2007-07-16 Thread Zoltán Németh
2007. 07. 16, hétfő keltezéssel 15.40-kor [EMAIL PROTECTED] ezt írta: > Hi I have this script which pulls 1 random item from a txt file. > How would I modify it to pull 10 random items. > > $delim = "\n"; > $quotefile = "names.txt"; > $fp = fopen($quotefile, "r"); > $contents = fread($fp, file

[PHP] multiple random items

2007-07-16 Thread chris
Hi I have this script which pulls 1 random item from a txt file. How would I modify it to pull 10 random items. $delim = "\n"; $quotefile = "names.txt"; $fp = fopen($quotefile, "r"); $contents = fread($fp, filesize($quotefile)); $quote_arr = explode($delim,$contents); fclose($fp); // genera