PHP Array Exercises : Generate a random password using shuffle() function
Write a PHP function to generate a random password (contains uppercase, lowercase, numeric and other) using shuffle() function.
Sample Solution:
PHP Code:
Output:
Generated Password : h1'1#h7Gqfy
Flowchart:

PHP Code Editor:
Contribute your code and comments through Disqus.
Previous: Write a PHP function to shuffle an associative array, preserving key, value pairs.
Next: Write a PHP script to sort an array in reverse order (highest to lowest).
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics