RE: [PHP] Generate random number

2005-03-30 Thread PtitRun
For example : $number = mt_rand(1,100); -Message d'origine- De : William Stokes [mailto:[EMAIL PROTECTED] Envoyé : mercredi 30 mars 2005 12:02 À : php-general@lists.php.net Objet : [PHP] Generate random number Hello How can I generate a ramdom number let's say between 1-

RE: [PHP] Generate random number

2005-03-30 Thread Kim Madsen
> -Original Message- > From: William Stokes [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 30, 2005 12:02 PM > How can I generate a ramdom number let's say between 1- 1 000 000 and > store > it in a variable? Go to php.net, search for random and You will find... http://php.net/manua

[PHP] Generate random number

2005-03-30 Thread William Stokes
Hello How can I generate a ramdom number let's say between 1- 1 000 000 and store it in a variable? Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] generate random

2003-05-30 Thread David Grant
Leif K-Brooks wrote: I reccomend you RTFM! There's a MANUAL?! Wow! :) -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered Office: 43 Royal Park, Bristol, BS8 3AN Studio: Whittakers House, 32 - 34 Hotwell Ro

Re: [PHP] generate random

2003-05-30 Thread David Grant
Marius wrote: how to generate random number ? Look no further than rand(). Well, actually do look further because srand() is better. Regards, David -- David Grant Web Developer [EMAIL PROTECTED] http://www.wiredmedia.co.uk Tel: 0117 930 4365, Fax: 0870 169 7625 Wired Media Ltd Registered O

Re: [PHP] generate random

2003-05-30 Thread Leif K-Brooks
I reccomend you RTFM! www.php.net/rand www.php.net/mt_rand Marius wrote: how to generate random number ? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http

[PHP] generate random

2003-05-30 Thread Marius
how to generate random number ? -- Marius [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] generate random ascii string

2001-09-01 Thread bill
Philip, With a few tweaks, it works great, thanks! Here's what worked: function randomString($len) { global $seed; $tmp = ''; $chars = 'abcdefghijklmnopqrstuvwxyz'; $chars .= strtoupper($chars); $chars .= '0123456789'; if (empty($seed)) { mt_srand ((float) microtime() * 10

Re: [PHP] generate random ascii string

2001-09-01 Thread Philip Olson
Hi Bill, Here's a quick hack, should get you on your way : function randomString($len) { global $seed; $tmp = ''; $chars = 'abcdefghijklmnopqrstuvwxyz'; $chars .= strtoupper($chars); $chars .= '0123456789'; if (empty($seed)) { mt_srand ((float) microtime() * 100); $seed

Re: [PHP] generate random ascii string

2001-09-01 Thread Sean C. McCarthy
Hi, If you have random string including symbols just take them of with regexp. Look at the manual for regular expresion functions. Hope it helps. Sean C. McCarthy SCI, s.L. (www.sci-spain.com) bill wrote: > > How can a random string of only letters and numbers be generated? >

[PHP] generate random ascii string

2001-09-01 Thread bill
How can a random string of only letters and numbers be generated? I'm stumped so far on how to avoid including symbols. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrat

Re: [PHP] Generate Random Letters?

2001-03-09 Thread mjriding
You could use: select char(rand(128)); Will dispaly character with ascii value of 0 - 128. Thanks, Michael Ridinger On Fri, 9 Mar 2001 [EMAIL PROTECTED] wrote: > I know it is possible to generate a random number using rand() I don`t > suppose there is anyway to generate a random letter seq

RE: [PHP] Generate Random Letters?

2001-03-09 Thread Nathaniel Hekman
Random lower-case letter: $randomletter = chr(rand(ord("a"), ord("z"))) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 8:13 AM To: [EMAIL PROTECTED] Subject: [PHP] Generate Random Letters? I know it is po

Re: [PHP] Generate Random Letters?

2001-03-09 Thread Adam Wright
reate random strings. Just fill in $possible_letters with anything you like adamw - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 09, 2001 3:12 PM Subject: [PHP] Generate Random Letters? > I know it is possible to generate a

[PHP] Generate Random Letters?

2001-03-09 Thread Website4S
I know it is possible to generate a random number using rand() I don`t suppose there is anyway to generate a random letter sequence that anyone knows of? Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO