Welcome Guest, Not a member yet? Register   Sign In
random_string()
#1

[eluser]SaSa[/eluser]
hello
I want using of the string Numeric.
Code:
$this->load->helper('string');
echo random_string('numeric', 6);
did is likely repeated string Numeric?
#2

[eluser]MathBoon[/eluser]
Code:
random_string()

Generates a random string based on the type and length you specify.

Could you repeat your question? It's not really understandable.
#3

[eluser]SaSa[/eluser]
did this string is unique?(Not duplicate)
#4

[eluser]darrentaytay[/eluser]
This will not give you a unique number and it's entirely possible for it to be duplicated.
#5

[eluser]SaSa[/eluser]
Thanks
For a string with six unique characters do what?
Please tell an example
#6

[eluser]danmontgomery[/eluser]
Your question is entirely too vague. Unique to what? Are you talking distributed, globally unique keys? "Unique" in that no two generated are ever the same? No two consecutive? Numeric? Alphanumeric? Help us help you.
#7

[eluser]SaSa[/eluser]
Unique for store to database. (not repeat)
the type no matter, numeric or alphanumeric.with six characters
#8

[eluser]danmontgomery[/eluser]
What good reason is there to force 6 characters? If you're talking about distributed keys, you need to use UUIDs, and they will be much longer than 6 characters. If you're not, save yourself the headache and use auto increment.




Theme © iAndrew 2016 - Forum software by © MyBB