Re: Random php
| From: | Gary | Date: | Sat, 11 Apr 2009 14:52:11 +0000 |
| Subject: | Re: Random php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291364@lists.php.net to get a copy of this message | ||
Thanks much for your quick reply, I'll take a look (and maybe even find one
that spell checks my posts first!).
Gary
"Phpster" <phpster@gmail.com> wrote in message
news:146A4DA4-0114-474C-92F8-B8D3A5ECC232@gmail.com...
>
>
> On Apr 11, 2009, at 10:12, "Gary" <gwpaul@ptd.net> wrote:
>
>> Is there a way to have a php include called ramdomly? For example, I
>> have
>> an area that I am using to show various quotes and I would like the
>> quotes
>> to be ramdom.
>>
>> Thanks for your help
>>
>> Gary
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> Best is to use a storage system ( either file with a quote in each line
> or a database ) and then randomly select a record from the database or
> an item from the file. If you do a quick search on www.hotscripts.com or
> just goodle 'php random quote' you'll see lots of samples or complete
> code.
>
> Bastien