Ask and ye shall receive.
Best I can think of, also includes a few more symbols in the calculation, see ascii table: http://www.asciitable.com/index/asciifull.gifPHP:function saltGenerator($limitChars=8) { $saltv = ''; for (; $limitChars; --$limitChars) $saltv .= chr(rand(33,126)); return $saltv; }
:D thanks for that, makes the function more usable
Last edited: