PHP Math Function : decbin()

The decbin() function used to convert a decimal number to a binary number. The Syntax is :
 decbin( number );
Example :
<?php

  echo decbin(150) . "<br/>";
  echo decbin(45) . "<br/>";
  echo decbin(15) . "<br/>";

?>
Output :

10010110
101101
1111


Next Topic :