Use mt_rand(min,max) to generate values.
For alphabetic values, use it in a loop three times with a range that spans 1 through 26 (or ascii value equivalents of A through Z). In either case, cunningly create character values out of them.
Then, loop through it ten times with the range (0, 9). Loop through for as many digits as you wish.
So - it should look something like:
$randString = '';
for($i=0; $i<3; $i++)
$randString .= (your chars);
for($i=0; $i<8; $i++)
$randString .= Use mt_rand(0, 9);