On Friday 13 February 2004 18:37, Angela K Hilton wrote:

> I could do with some pointers in using mt_strand.>

You do mean mt_srand() ?

[snip]

> mt_srand(make_seed());

Just do the above *once*, somewhere near the top of your code (anywhere before 
you use mt_rand()).

Then just use mt_rand() wherever you need it, like eg:

  $image = $random[mt_rand(0, count($random)-1)];

If you're just picking a random item from an array. the nice people who 
develop php have provided a function to do just that, array_rand(). RTFM 
before use.

> However - I'm not 100% sure how to incorporate it into my code - I have
> tried a few things but each time I break the code.

It would help if you stated exactly what you did and how your code was broken.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I've run DOOM more in the last few days than I have the last few
months.  I just love debugging ;-)
(Linus Torvalds)
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to