RE: [PHP] shuffle

From: Date: Wed, 14 Jul 2004 21:01:54 +0000
Subject: RE: [PHP] shuffle
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190538@lists.php.net to get a copy of this message
I didn't try that but it works great...thanks! -----Original Message----- From: Torsten Roehr [mailto:roehr@zilleon.com] Sent: Wednesday, July 14, 2004 3:53 PM To: php-general@lists.php.net Subject: Re: [PHP] shuffle "Edward Peloke" <epeloke@echoman.com> wrote in message news:NKEFLLFBJFIKEGAGKPCAMEEIDIAA.epeloke@echoman.com... > it is strange... > > if I do this: > > function nextRecord(){ > $this->record=@mysql_fetch_array($this->queryID); > $test=$this->record; > echo $test; > > $status=is_array($this->record); > return ($status); > } > > "Array" is echoed for $test so I know it is an array but if I add this: > > shuffle($test); > > I get the warning that shuffle() expects parameter 1 to be an array, boolean > given. Have you tried shuffling in MySQL?: SELECT * FROM table ORDER BY RAND() Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#190538) next »