Source Code:
(back to article)
<?php $number = "10"; $base_from = 10; $base_to = 2; // Convert the number from base 10 to base 2 using the base_convert() function $converted_number = base_convert($number, $base_from, $base_to); // Output the converted number echo $converted_number; ?>
Result:
Report an issue