Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


how to create a random string using php


how to create a random string using php  using -'php,string,random'

I know that the rand function in PHP generates random integers, but what is the best way to generate a random string such as:

Original string, 9 chars

$string = 'abcdefghi';


Example random string limiting to 6 chars

$string = 'ibfeca';


UPDATE: I have found tons of these types of functions, basically I'm trying to understand the logic behind each step.

UPDATE: The function should generate any amount of chars as required.

Please comment the parts if you reply.
    

asked Sep 10, 2015 by WildaBannerm
0 votes
15 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...