public function generateId($intLength = 8)
    {
        $strChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        $strReturn = '';

        srand((double) microtime() * 1000000);

        for ($i = 1; $i <= $intLength; $i ++) {
            $intNum = rand() % (strlen($strChars) - 1);
            $strTmp = substr($strChars, $intNum, 1);
            $strReturn .= $strTmp;
        }

        return $strReturn;
    }
public function generateId($intLength = 8)
    {
        $strChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        $strReturn = '';

        srand((double) microtime() * 1000000);

        for ($i = 1; $i <= $intLength; $i ++) {
            $intNum = rand() % (strlen($strChars) - 1);
            $strTmp = substr($strChars, $intNum, 1);
            $strReturn .= $strTmp;
        }

        return $strReturn;
    }
public function generateId ( $ intLength = 8 ) { $ strChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ; $ strReturn = '' ; srand ( ( double ) microtime ( ) * 1000000 ) ; for ( $ i = 1 ; $ i <= $ intLength ; $ i ++ ) { $ intNum = rand ( ) % ( strlen ( $ strChars ) - 1 ) ; $ strTmp = substr ( $ strChars , $ intNum , 1 ) ; $ strReturn .= $ strTmp ; } return $ strReturn ; }
Generate a unique ID
@param integer $intLength ID length
@return string Generated ID
Generate a unique ID