It need not be meaningful words - more like random password generation, but the catch is - they should be unique. I will be using this for some kind of package / product cod
Galen's answer allows only one use of each character in the password. Not much information in that string. A simple change though:
$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
$passwordlength = 7;
for ($x = 1; $x <= $passwordlength; $x++) {
$charlist .= $chars;
}
$temp_pw = substr( str_shuffle( $charlist ), 0, $passwordlength );