Does this small piece of code seem ok? |
or what about -- start with a current date / time / seconds / microsecond string
so that exact string will only occur once every microsecond and will never repeat and then after the microsecond -- add a random string.
Especially compared to all of the discussion about randomness, this is a minor item, but I would generally forego the extra variable and do something like this:
PHP Code: $check = 0; or PHP Code: do {
(11-04-2015, 10:50 AM)mwhitney Wrote: Especially compared to all of the discussion about randomness, this is a minor item, but I would generally forego the extra variable and do something like this: It has been awhile but I just had to reply on this. Shouldn't it be PHP Code: while( $check === 1 ) Because no match means $check remains 0 and the cycle is run again right? But we only want the cycle to rerun if a match was found setting $check = 1;
Lol. Good spot. Actually it should be
PHP Code: $check = 1; Because you might get more than one match. |
Welcome Guest, Not a member yet? Register Sign In |