FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » randomly sorting files in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: randomly sorting files in php [message #180581 is a reply to message #180580] Fri, 01 March 2013 06:54 Go to previous messageGo to previous message
David Robley is currently offline  David Robley
Messages: 23
Registered: March 2013
Karma:
Junior Member
Cal Dershowitz wrote:

> On 02/28/2013 08:45 PM, Jerry Stuckle wrote:
>> On 2/28/2013 8:49 PM, Cal Dershowitz wrote:
>
>>> So does php have a way to do this that is as simple as it might be in
>>> perl, for example?
>>
>> Sure, you *can* do it in PHP. But if you have a working bash script,
>> why reinvent the wheel? Especially since it sounds like you don't know
>> much about PHP.
>>
>
> Well, if I can't invoke random behavior, I can't think that I have any
> Thuring-compliant medium.
>
> It's to be taken as a learning-example. I can accomplish this in every
> syntax I know. I'd like to accomplish this in one I don't.

Have a look at these functions for starters:

rand()
array_rand()
shuffle()

--
Cheers
David Robley

It is bad luck to be superstitious.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to avoid the use of session variables in this script
Next Topic: all done
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:53:54 GMT 2024

Total time taken to generate the page: 0.04440 seconds