.


Divya

base_convert() Function in PHP with Example


base_convert() — This PHP function converts a number between two bases. Supported bases includes base-2 through base-36. Digits in numbers with a base higher than 10 will be represented with the letters (a through z), with the letter a to mean 10, the letter b to mean 11 and the letter z to mean 35.

Note that base_convert() function may lose precision on large numbers due to the properties related to the internal "double" or "float" type used.

Example

<!DOCTYPE html>
<html>
<body>
<?php
$hexadecimal = "f196";
echo base_convert($hexadecimal,19,9);
?>
</body>
</html>


.