How to use decbin in PHP

This article describe about decbin() Function in PHP.
  • 1272

decbin() Function

For convert decimal number to binary number use decbin() function.

Syntax

decbin(dec_number)

 

Parameter Description
dec_number Define the decimal number to convert

Example

<html>
<body>
<?php
echo decbin("4") . "<br />";
echo decbin("1") . "<br />";
echo decbin("399") . "<br />";
echo decbin("15");
?>
</body>
</html>

 

Output


decbinphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.