I had a similar issue with rand() not too long ago, it just returned
the same number under all circumstances. From memory, there is a
particular version of PHP with a bug in it that causes this. I forget
where I found this answer now so cannot provide a link I'm afraid.

I ended up using srand() to fix.

ianh

------------------------
EventHQ - professional online event registration and marketing
http://www.eventhq.co.uk


On Aug 3, 11:25 pm, Miles J <mileswjohn...@gmail.com> wrote:
> I found this very weird bug today, and I am extremely stumped on the
> problem.
>
> I was working on a static ad system. The ads are listed in an array
> and I would shuffle() the array and then output the first index as the
> current ad for that request. It works fine locally but online it does
> not. So then I tried using rand(), same problem.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to