so, like this:?
$totalChar1 = 3; // number of chars in the password
$salt1 = "0123456789"; // salt to select chars from
srand((double)microtime()*1000000); // start the random generator
$ran_num3=""; // set the inital variable
for ($i1=0;$i1<$totalChar1;$i1++) // loop and create password
$ran_num3 = $ran_num3 . substr ($salt1, rand() % strlen($salt1), 1);
$ran_num3 = (0, 400);
Coz that doesn't work lol