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

Home » Imported messages » comp.lang.php » When a random file is not found then what?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: When a random file is not found then what? [message #185197 is a reply to message #185196] Sat, 08 March 2014 13:47 Go to previous messageGo to previous message
Mr Oldies is currently offline  Mr Oldies
Messages: 241
Registered: October 2013
Karma:
Senior Member
On Sat, 08 Mar 2014 04:03:15 +0000, Ben Bacarisse wrote:

> richard <noreply(at)example(dot)com> writes:
>
>> I want to set up a routine so that when a file does not exist, another file
>> is selected.
>>
>> 1) select the year randomly.
>> 2) selectt one of 100 numbers.
>> 3) combine the pair.
>> 4) locate file and play.
>> 5) if file does not exist, do it again until one is found.
>
> Why not select and play a file chosen randomly from those that do exist,
> possibly filtered by some criterion such a the year?

yeah that could work.
read the directory, build the array on what's in it.
select from the array.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php exec http url
Next Topic: switch with range of comparisons
Goto Forum:
  

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

Current Time: Thu Nov 28 04:03:37 GMT 2024

Total time taken to generate the page: 0.04864 seconds