Convert Decimal Number to Binary String using PHP

decbin function

<?php

$decimalNumber = 20;
$binaryString = decbin($decimalNumber);

echo $binaryString;

Leave a Comment

Cancel reply

Your email address will not be published.