I have three strings and i want to generate a random string using those 3 strings with including some random number between the strings.
Thank You
Ex: first string : john
second string : smith
third string : john9k
I want a random string like : john.simth190, smith.john9k, john9k.123.smith, etc.,
How to do this in PHP.
Thank You
rand()
will give you random numbers and dot (.
) performs string concatenation, e.g.echo 'john' . rand(1, 1000) . '.smith';
might yieldjohn271.smith
. – David Harkness Feb 15 '11 at 6:46