the above suggestion is a good one, depending on what you're looking for. If you're looking for random passwords or something else the user has to type then that it probably not a good solution though. You may want to try something like this:
<?php
function rand_string($length)
{
$retval = '';
for($i=0;$i<$length;$i++)
{
$which = rand(0,2);
switch($which)
{
//generate a number
case 0:
$retval .= chr(rand(48,57));
break;
//generate a capital letter
case 1:
$retval .= chr(rand(65,90));
break;
//generate a lower case letter
case 2:
$retval .= chr(rand(97,122));
break;
} //end switch
} //end for
return $retval;
} //end rand_string
?>
In tests with 6 character strings this function generated 100,000 unique strings when run through a for loop and called 100,000 times - I'd say that's pretty random.