belongs to collection: String PHP programs with examples
Write a PHP script to generate simple random password from a given string
Note : Password length should be be 6, 7, 8,9,10.
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following example.
<?php function password_generate($char) { $data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz'; return substr(str_shuffle($data), 0, $char); } echo password_generate(10)."\n"; ?>
Result:
ezStEbXAl2
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following example.
Result:
need an explanation for this answer? contact us directly to get an explanation for this answer