Php program to print the number using decbin

A Php program to print the number using decbin. In this program we can print the number using decbin for beginner in php. In PHP, the decbin() method returns a string that contains a binary version of the supplied decimal number argument. The term decbin refers to the conversion of decimal to binary. It is the decimal number that you wish to convert to binary form.

<?php 
echo (decbin(29)."<br/>");
echo (decbin(3)."<br/>");
echo (decbin(5)."<br/>");
?>

 

Output:

11101

11

101