PHP bindec() Function Example

PHP bindec() Function Example


Posted in : PHP Posted on : January 28, 2011 at 6:18 PM Comments : [ 0 ]

In PHP, The bindec() function used for conversion binary number to decimal number.

PHP bindec() Function Example:

In PHP, The bindec() function used for conversion binary number to decimal number.

Syntax:

bindec(binary_number)

binary_number is a binary number argument parameter for this function.

Example:

<?php
$return = bindec(10010101);
echo "The value of bindec(10010101) is : " . $return . "<br />";

$return_value1 = bindec(111);
echo "The value of bindec(111) is : " . $return_value1;
?> 

Output:

The value of bindec(10010101) is : 149
The value of bindec(111) is : 7

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics