Create random strings in PHP

I made a PHP function which returns a random string using Alphabets [a to z] and [A to Z], Numbers [0 to 9]. It is very easy to use and can be easily modified.

How to call it ??

Note: You can remove any of the ranges in $valid_characters (For e.g. if you do not want uppercase letters in random string then delete the range('A','Z')) or you can put you own array of custom characters.

Ashutosh Pratap

By Ashutosh Pratap

I am software developer by profession and doing work and research in field of Computer programmings like PHP, WordPress, Magento, jQuery, Google APIs and many more web languages. Apart from this I write blogs on programming languages like PHP, Javascript, WordPress etc. I am also individual and independent Freelancer so you can hire me for your web work.

Leave a comment

Your email address will not be published. Required fields are marked *