Re: Choosing a random value out of two
| From: | Sebastian Sprenger | Date: | Fri, 04 May 2001 10:00:52 +0000 |
| Subject: | Re: Choosing a random value out of two | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51390@lists.php.net to get a copy of this message | ||
THANKSALOT!
sebastian
""Taylor, Stewart"" <Stewart.Taylor@uk.thalesgroup.com> schrieb im
Newsbeitrag
news:2B25A9C95DC8D411BBE500508BB19239515CE8@ntslxch1.int.rdel.co.uk...
> srand((double) microtime() * 1000000);
> $which = rand(0,1);
> $variable = ($which)? $value1 : $ value2;
>
> -Stewart
>
> -----Original Message-----
> From: Sebastian Sprenger [mailto:creation@sprenger.cc]
> Sent: 04 May 2001 10:21
> To: php-general@lists.php.net
> Subject: [PHP] Choosing a random value out of two
>
>
> hi. i want to randomly assign either "value1" or "value2" to a $variable.
> how can that be done?
> thanks,
> Sebastian
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>