Monday 5 November 2012

convert to binary in PHP

In PHP decbin function is used to convert anything to binary

Example:
<?php
$a = "3";
$b = 4;
echo decbin($a)."<br>";
echo decbin($b);
?>

Output:
11
100

Share This!



No comments:

Post a Comment

Here We Write The Problems we face at different situations and Solutions to those problems.