775 snippets from 1546 members, and growing!
|
login
|
join
about
bytebin
members
tags
snippets
join
Snippets
Submit a Snippet
Search Snippets
New Snippets
Top Snippets
Top Tags
PHP
(136)
JavaScript
(123)
Java
(66)
VBSCRIPT
(58)
String
(44)
CSS
(31)
CSharp
(28)
File
(28)
HTML
(27)
C
(24)
mysql
(24)
VB.NET
(24)
python
(24)
CPlusPlus
(23)
groovy
(23)
New Snippets
Top 15 Ways To Ma...
Top 15 Ways To Ma...
Top 15 Ways To Ma...
Top 15 Ways To Ma...
Top 15 Ways To Ma...
Very lightweight ...
AutoComplete plug...
AutoComplete plug...
Connection Java -...
View PostgreSql
Venture Capital Jobs
New Members
NationalCollection
me
jamesmcm
Can
Kelmi
ysg
dannymo2
chorny
wallie
Hackdemian
Top Members
dannyboy
sundaramkumar
mattrmiller
Pio
i_kenneth
ASmith
ctiggerf
sehrgut
bertheymans
SCoon
Home
/
Snippets
/
Random String Generator
/
Comments
Random String Generator
Snippet Menu
Revisions
Comments
Related Snippets
Add to Favorites
Email Snippet
Download Snippet
Print Snippet
Blog Snippet
snippet
|
revisions
|
comments
|
related
|
Add to Favorites
|
email
download
|
print
|
blog it
New Comment
Good
Wed. Apr. 2nd, 2008 3:34 PM
sehrgut
Probably the most correct of similar implementations here. I'd make one change, and that is to change the function prototype as below.
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?
function
getRandomString
(
$length
,
$chars
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
)
Reply
New Comment
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?