Forum Moderators: coopster
I have a variable set as a vary long integer. This integer is unique to the user.
What I am trying to do is to cut down on the length of the integer, while still maintaining its uniqueness.
I'm thinking somehow converting this number from being numeric (10 characters) to alphanumeric (36 characters) will help me cut this number by more than a third.
I'm looking at different options, but things such as sprintf's conversion to an octal or hexadecimal number will not accomplish what I need.
Is there a PHP function that does something like this?
Thanks
$num = 12308912309;
$num = [url=http://us3.php.net/manual/en/function.base-convert.php]base_convert[/url]($num,10,36);
echo $num;