Software Development Resources
Main Page | Software Development | Categories | Recent changes | About DocForge
Log in / create account | Log in with OpenID | Help

PHP/base convert

From DocForge

< PHP

base_convert is a PHP function which converts numbers between bases.

string base_convert ( string $number, int $frombase, int $tobase )

base_convert returns a string containing $number converted from base $frombase (the base of $number) to base $tobase. $frombase and $tobase must be between 2 and 36, inclusive. Digits in numbers with a base higher than 10 will be represented with the letters a-z (a = 10, b = 11, etc.).

Discussion

comments powered by Disqus