There is no one function to make a random string, and those that are built in are generally not designed for password generation for human use.
What you will need to do would be to use a random number generator to generate random numbers (so that's what they do... 🙂 and convert them to characters. Something like:
mt_srand((double)microtime()*100000);
$password='';
for($i=0;$i<8;++$i)
$password.=chr(mt_rand(ord('a'),ord('z'));
Will generate an 8-letter random password; but to be honest I wouldn't use this piece of code in a real situation.
Generation can be a lot more sophisitcated - for example, you could store an array of syllables and put a random bunch of those together to make a password that's more or less pronounceable. There are some password-generation functions of varying quality in this site's code library, under "Algorithms".