Source Code:
(back to article)
<?php $binary_number = "1010"; // Convert the binary number to a decimal number using the bindec() function $decimal_number = bindec($binary_number); // Output the decimal number echo $decimal_number; ?>
Result:
Report an issue